AI Glot websiteOpen AI Glot
TranslationsCreate a translation
batches

Create a translation

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. Send an Idempotency-Key header (any 1 to 255 printable characters, a UUID is fine) on the other sources to make a retry after a lost response safe: a repeat returns the batch the first attempt created, without fetching or storing the file or planning again, and the same key with different content is refused with 409 idempotency_key_reused. 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

Requires batches:create. Creating a translation costs nothing: credits are reserved only when you approve a plan.

Choosing how to send the file

Choose the transport that matches where the document lives and what your client can do.

TransportUse it forNotes
JSON with upload_idA local file sent through a temporary upload sessionUse the same credential that created the session. Omit filename. Repeating creation returns the existing translation without changing its instruction.
JSON with contentAny text formatThe file itself as UTF-8 text. The simplest path for an agent that already holds the content in memory.
JSON with file_urlA file already hostedHTTPS only, fetched server-side. Redirects are not followed, so give the final URL.
multipart/form-dataLocal binary files, including XLSX, DOCX, PPTX, PDF, IDML and ZIPSend the original bytes in the file field. This is the CLI’s local-file transport.

filename is optional but worth sending. The extension is how the format is identified, so a name like strings.xml and a name like export.csv lead to different parsers on identical bytes.

Retrying safely

Send an Idempotency-Key header (any 1 to 255 printable characters; a UUID is a good choice) so a retry after a lost response returns the translation the first attempt created, instead of a second one. A repeat is answered before the file is fetched or stored and does not plan again, so it costs nothing. The key is bound to what you sent: the same key with a different file, name or instruction is refused with idempotency_key_reused. Use a new key for new work. Where headers are not available (MCP tools, Code Mode) pass idempotency_key in the body. A creation with an instruction returns plan_revision with the plan: pass it as expected_plan_revision when you approve.

What happens next

The response gives you an id, used as batch_id in subsequent paths. From there the sequence is always the same:

  1. POST /v1/batches/{batch_id}/plan: describe what to translate, in your own words.
  2. POST /v1/batches/{batch_id}/approve: spend credits and start.
  3. GET /v1/batches/{batch_id}: poll until it finishes.
  4. GET /v1/batches/{batch_id}/result: collect the result. It returns a signed link, not the file itself.

Response

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.