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
Send raw bytes to a temporary upload session
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, file_retention_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: batch_not_found, glossary_not_found, resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: glossary_already_exists, result_not_ready, batch_not_editable, no_plan_yet, batch_not_awaiting_approval
errorobjectrequiredrequest_idstringrequiredPossible codes: file_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large, file_too_large, result_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: language_not_supported, invalid_language_pair, glossary_term_limit_reached, glossary_limit_reached, invalid_glossary_terms, unsupported_format, file_fetch_failed, plan_invalid
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired