AI Glot websiteOpen AI Glot
TranslationsCreate an upload session
uploads

Create an upload session

Prepare a local file upload for an agent that can read the bytes and make HTTP PUT calls outside MCP. Returns upload_url, method, exact headers, upload_id and instructions. Send the original raw bytes with the returned temporary Authorization header, never a workspace API key or OAuth token. The upload capability expires after 10 minutes and permits one PUT attempt. After success, send upload_id to create a translation on the same credential within one hour. Costs no credits. Maximum 20 pending uploads and 120 sessions per hour per workspace.

POST/v1/uploads

Requires batches:create. Creating a session costs no credits and does not create a translation. Send a bare filename with its supported extension and the exact size of the original bytes:

JSON
{ "filename": "catalogue.xlsx", "size_bytes": 4096 }

The response contains upload_id, upload_url, method, headers, expires_at, consume_until and human-readable instructions. Use the returned URL and headers exactly with an external HTTP client, then create the translation with upload_id on the same credential. The filename is already attached to the session.

javascript
const session = createUploadResponse.data;
const uploaded = await fetch(session.upload_url, {
  method: session.method,
  headers: session.headers,
  body: originalFileBytes,
  redirect: "error",
});
if (!uploaded.ok) throw new Error(`Upload failed: ${uploaded.status}`);
// Use the original workspace credential for POST /v1/batches:
// { upload_id: session.upload_id, instruction: "Translate into French" }

The temporary Authorization header grants only one upload attempt for this document within 10 minutes. The URL alone grants no access. Never replace that header with a workspace API key or OAuth token, put secrets in a URL, follow redirects, or log the temporary headers. The upload secret cannot read documents, create translations or approve spending. Revoking the connection or removing its permission invalidates its unused upload capabilities.

The received byte count must match size_bytes; the per-format limit is checked before the capability is issued. Create the translation within one hour. A workspace can have 20 pending uploads and create 120 sessions per hour. Unused files are eligible for cleanup after 24 hours and collected by the daily sweep. Once a translation owns the file, its normal retention applies. Recovery by upload_id is available until session cleanup, at least 24 hours after issuance. Keep the batch ID to retrieve the translation from your history afterwards.

Requirements for agents

The agent runtime needs local file access and an HTTP client that can send raw PUT requests. MCP alone cannot send binary bytes, and AI Glot Code Mode has no local file access or outbound HTTP. If those capabilities are missing, tell the user plainly that the assistant cannot send the attachment. Recommend uploading in the AI Glot web app, using the CLI, or providing an HTTPS download link for file_url. Never claim that an upload succeeded without verifying it.

After upload, review the translation plan and its exclusions before approving the credit cost. Send raw bytes describes retries and failures.

Response

application/json

Create a temporary file upload session

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.