AI Glot websiteOpen AI Glot
VertalingenBestandsbytes versturen
uploads

Bestandsbytes versturen

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

Gebruik de upload_url, method en headers die zijn geretourneerd bij het aanmaken van een uploadsessie. Voor dit endpoint is de tijdelijke Authorization-header vereist, die alleen voor uploads geldt. Een API-sleutel voor de workspace of een OAuth-toegangstoken geeft geen toestemming voor dit verzoek.

Verstuur het bestand zelf als HTTP-body met Content-Type: application/octet-stream. Verpak het niet in JSON, base64 of multipart. Als Content-Length wordt meegestuurd, moet deze gelijk zijn aan de size_bytes van de sessie. Ook zonder die header blijft het verzoek begrensd door de verwachte grootte. Gecomprimeerde HTTP-bodies worden geweigerd; verstuur de oorspronkelijke documentbytes.

Een geslaagde respons bevat upload_id, uploaded: true en size_bytes. Ga verder door upload_id mee te sturen bij het aanmaken van een vertaling, met dezelfde workspace-inloggegevens waarmee de sessie is aangemaakt. De vertaling wordt pas gestart en kost pas credits nadat deze is goedgekeurd.

Veilig herstellen

Eén sessie staat één PUT-poging toe. Gelijktijdige verzoeken en herhaalde PUT-verzoeken kunnen het bestand niet vervangen. Voor een mislukte of onderbroken poging is een nieuwe sessie nodig.

Als de uploadrespons verloren is gegaan, probeer dan eerst met de bestaande upload_id een vertaling aan te maken. Een volledige upload blijft bewaard, ook als de client de succesrespons niet heeft ontvangen. Als er geen volledige upload beschikbaar is, vraag dan een nieuwe sessie aan en verstuur het bestand opnieuw. Verstuur de bytes nooit opnieuw om de oude sessie te overschrijven. Herstel via upload_id is mogelijk totdat de sessie wordt opgeschoond, en minstens 24 uur na uitgifte. Bewaar de batch-ID om de vertaling later in je geschiedenis terug te vinden.

Een verlopen upload geeft file_expired terug. Een PUT nadat de mogelijkheid is gebruikt, geeft batch_not_editable terug. Een andere verbinding of workspace kan de upload niet gebruiken. Onvolledige bytes of een onjuiste grootte geven invalid_parameter terug; bytes boven de sessiegrootte geven file_too_large terug.

Dit binaire endpoint wordt aangeroepen door een externe HTTP-client, niet door een MCP-tool of een AI Glot Code Mode-script. Als je assistent geen toegang heeft tot het oorspronkelijke bestand of geen PUT-verzoek kan versturen, vertel dit dan aan de gebruiker en bied de webapp, CLI of een HTTPS-downloadlink aan. Maak het tijdelijke geheim nooit bekend in je uitleg.

Antwoord

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.