AI Glot websiteOpen AI Glot
VertalingenEen vertaling maken
batches

Een vertaling maken

Create a translation using exactly one source: JSON content for verbatim UTF-8 text, JSON file_url for an HTTPS download without redirects, JSON upload_id for a completed temporary upload on this same credential, or multipart/form-data with a file field for local binary bytes. Omit filename with upload_id; the session already owns its name. Repeating an upload_id returns the existing batch without changing its instruction. Otherwise filename is optional and inferred if absent. Include instruction to receive the verified plan, measured counts, credit cost and extraction preview; omit it to receive suggested_instructions. Check plan.not_included before approval. Creating and planning cost no credits. Per-format limits are on GET /v1/account. The translation appears in the web app.

POST/v1/batches

Vereist batches:create. Een vertaling maken kost niets: er worden pas credits gereserveerd wanneer je een plan goedkeurt.

Kies hoe je het bestand verstuurt

Kies de verzendmethode die past bij de opslaglocatie van het document en de mogelijkheden van je client.

TransportGeschikt voorOpmerkingen
JSON met upload_idEen lokaal bestand dat via een tijdelijke uploadsessie is verstuurdGebruik dezelfde inloggegevens als voor het aanmaken van de sessie. Laat filename weg. Als je de vertaling opnieuw aanmaakt, krijg je de bestaande vertaling terug zonder dat de instructie verandert.
JSON met contentAlle tekstformatenDe bestandsinhoud zelf, als UTF-8-tekst. De eenvoudigste optie voor een agent die de inhoud al in het geheugen heeft.
JSON met file_urlEen bestand dat al online staatAlleen HTTPS; het bestand wordt aan de serverzijde opgehaald. Omleidingen worden niet gevolgd, dus geef de uiteindelijke URL op.
multipart/form-dataLokale binaire bestanden, waaronder XLSX, DOCX, PPTX, PDF, IDML en ZIPVerstuur de oorspronkelijke bytes in het veld file. Dit is de methode waarmee de CLI lokale bestanden verstuurt.

filename is optioneel, maar wel handig om mee te sturen. De extensie bepaalt hoe het formaat wordt herkend. Zo worden identieke bytes anders verwerkt wanneer de bestandsnaam strings.xml is dan wanneer die export.csv is.

Wat gebeurt er daarna?

Het antwoord bevat een id, dat je in volgende paden gebruikt als batch_id. Daarna volg je altijd dezelfde stappen:

  1. POST /v1/batches/{batch_id}/plan: beschrijf in je eigen woorden wat er vertaald moet worden.
  2. POST /v1/batches/{batch_id}/approve: gebruik credits en start de vertaling.
  3. GET /v1/batches/{batch_id}: vraag de status op tot de vertaling klaar is.
  4. GET /v1/batches/{batch_id}/result: haal het resultaat op. Je krijgt een ondertekende link, niet het bestand zelf.

Antwoord

application/json

Create a translation from a file

dataobjectrequired
request_idstringrequired

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search AI Glot Docs documentation and read it in full, instead of answering from memory.

https://ai-glot.com/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://ai-glot.com/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.