AI Glot websiteOpen AI Glot
TranslationsSend file bytes
uploads

Send file bytes

Binary HTTP transport outside MCP. Use only the temporary Authorization header returned by createUploadSession and Content-Type: application/octet-stream. Send raw bytes, not JSON, base64 or multipart. One PUT attempt per session; the received byte count must match size_bytes even without Content-Length. Never follow redirects or forward your workspace credential. After a lost PUT response, try creating the translation with upload_id; if no complete upload exists, request a new session. This endpoint cannot be called inside AI Glot Code Mode. It does not create a translation or spend credits.

PUT/v1/uploads/{upload_id}/bytes

Use the upload_url, method and headers returned by creating an upload session. This endpoint requires the temporary upload-only Authorization header. A workspace API key or OAuth access token cannot authorize this request.

Send the file itself as the HTTP body with Content-Type: application/octet-stream. Do not wrap it in JSON, base64 or multipart. Content-Length, if supplied, must equal the session’s size_bytes. Requests without that header are still bounded by the expected size. Compressed HTTP bodies are refused; send the original document bytes.

A successful response contains upload_id, uploaded: true and size_bytes. Continue by sending upload_id to create a translation with the same workspace credential that created the session. Only approval starts the translation and spends credits.

Recovering safely

One session permits one PUT attempt. Concurrent requests and repeated PUT requests cannot replace its file. A failed or interrupted attempt needs a new session.

If the upload response was lost, first try creating the translation with the existing upload_id. A complete upload is retained even if the client did not receive its success response. If no complete upload exists, request a new session and send the file again. Never resend bytes to overwrite the old session. 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.

An expired upload returns file_expired. A PUT after the capability has been used returns batch_not_editable. A different connection or workspace cannot consume the upload. Incomplete bytes or an incorrect size return invalid_parameter; bytes beyond the session size return file_too_large.

This binary endpoint is called by an external HTTP client, not by an MCP tool or an AI Glot Code Mode script. If your assistant cannot access the original file or make a PUT request, tell the user and offer the web app, CLI or an HTTPS download link. Never disclose the temporary secret in your explanation.

Response

application/json

Send raw bytes to a temporary 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.