Upload a context image

Uploads a new context image to the given project (multipart upload, plain form fields). Send the image in the file field and the language_code of the UI text shown in it. Without rendered_strings, the image is run through OCR text-detection and matched against the project's segments in that language; auto_connect_suggestions (default true) controls whether those matches are auto-connected or left as suggestions for manual review. Segments can also be attached explicitly via the attach endpoint. Requires project-level context-image management permission. Use the same Idempotency-Key when retrying an upload whose response was lost to recover the original context image. Optional capture_key scopes replacements to the default branch language. Equal hashes leave metadata, links and quota unchanged. Changed captures count as one upload, rebuild all their links and leave other images untouched. rendered_strings is a JSON array part and skips OCR, including [].

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
^pr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Unique identifier of the project.

Body Params
file
required

The image, at most 10 MB.

string
required

Language of the UI text shown in the image. The image can only be attached to segment texts of this language, and the language must be configured for the project.

string
length ≤ 4096

Display name of the context image, at most 4096 characters. Omit it to use the uploaded file's name.

string
length ≤ 4096

What the image shows, at most 4096 characters.

boolean
Defaults to true

How the segments matched by OCR text-detection are connected: true (the default) connects them to the image, false creates suggestions that require manual review in the web editor.

string
length ≤ 512

Stable capture identity within this project language. Same bytes are a no-op; changed bytes replace all links at the same image id.

string
length ≤ 256

Application version of this capture.

rendered_strings
array of objects

JSON array part with Content-Type application/json. Empty array skips OCR with no links; omit to run OCR.

rendered_strings
Headers
string
length between 1 and 255

Optional unique key for best-effort POST retry protection. Redis reserves the key, the request runs with ordinary service transactions, then the successful response is cached separately for 24 hours by default. There is no request-wide transaction or atomic commit between the operation and its replay result. A matching cached response is replayed verbatim with Idempotent-Replayed: true. Redis loss/eviction or retention expiry can remove protection and allow re-execution. Uploads and chunked bodies are covered; multipart boundaries and JSON property order may differ. Retries still pass validation and current authorization; a later 403/404 does not undo the original operation. A changed payload returns 422 idempotency_key_mismatch. A recent active reservation returns 409 idempotency_key_in_use with Retry-After. A retry with an unresolved key, including an unfinished reservation older than 5 minutes, returns 409 idempotency_outcome_unknown without Retry-After. This timeout does not release the reservation or permit re-execution while it is retained. Inspect the affected resource before starting a new operation; do not blindly reuse an unresolved key after expiry. A 4xx rejection releases the reservation, allowing the same key to be retried after correcting the cause. A 5xx or interruption after execution starts leaves it unresolved. An unavailable reservation store returns 503 before execution; an oversized request returns 413. Cache-save failure or a response over the cache limit preserves the original success status, headers and body; only future retries become unresolved. When idempotency is explicitly disabled by server configuration, the header is ignored and requests execute normally without retry protection. Use a new unique key for each intended operation.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json