Skip to main content
Send a POST to an inference endpoint. A 202 response contains the job’s id, current status, and result_schema_version: 2. Save the ID to retrieve the result.

Retrieve a result

The key needs jobs:read:own or jobs:read. Poll with exponential backoff until the job reaches a terminal status, or use webhooks. Result fields depend on the endpoint. Inspect error.type, error.code, and error.message for failures. Job results require authentication. By default, your organization’s retention period starts when the job completes. Scheduled cleanup clears expired private results. Independent image batches return ordered result.items, including for one input. Read image_count, succeeded_count, and failed_count for totals. Each item has input_index, status, and either result or error; it also retains your optional client_id. Read rendered images from a successful item’s result.image. Use analysis.status and analysis.reason_codes to distinguish a negative finding from unreadable or unassessable input. Processing failures appear in the job or item error.

Keep generated files public

Set the top-level public_output field to true when you submit a live job. The default is false. The job keeps its authenticated result indefinitely and publishes every generated file. For a JSON-only job such as vin.read, the same option keeps the OCR result available to authorized readers. It consumes zero public file storage. Input uploads keep their ordinary retention period. For example, submit this body to POST /v1/vin/read to retain the VIN result.
For multipart requests, send public_output as a separate boolean form field. For MCP, pass it as a top-level tool argument. Test jobs reject true. Permission to run the endpoint is sufficient to request public outputs. Uploading input files still requires uploads:create or storage:write. Generated files in a public job have direct public url values and expires_at: null. Anyone with a URL can access the file. Public files remain available until you unpublish the job and count toward your organization’s shared storage quota. Use GET /v1/outputs?job_id=... to list available files for a job, or omit job_id to list all visible files. Follow next_cursor while has_more is true. Each row includes its out_ identifier, file index, name, byte count, completion time, availability, and public URL when published. Use GET /v1/outputs/{id}/access for a current download URL. Private files return an expiring signed URL. Public files return their public URL with expires_at: null. Both reads require storage:read and job visibility through jobs:read or jobs:read:own. Results stay within your key’s organization and environment. To unpublish the job and all its files, send one request with storage:write and job visibility.
The response has an empty body. 202 means media revocation is pending. 204 means no media work remains. Cached public URLs may work briefly during propagation. Use the output access endpoint for current links. Once you unpublish the job, its original retention deadline applies again, measured from completion. If that deadline has passed, the next scheduled cleanup clears the result JSON. Unpublishing does not restart the retention period.

Wait for a result

On endpoints with sync_allowed: true, submit with ?wait=true to wait up to the endpoint’s time budget, at most 30 seconds. A completed job returns 200; pending work returns 202 and continues. Unsupported endpoints return 400 wait_not_supported. You can also retrieve any pending job with GET /v1/jobs/{id}?wait=true. Retrieval always returns 200 with its current status, even if the wait ends before completion.

Retry without duplicate work

Send a unique Idempotency-Key on each logical inference submission. Keep the same key and payload for transport retries. A replay returns the original submission response, so retrieve the job for its latest status.
Keys accept up to 255 characters. Records are retained for 24 hours. Do not rely on a key to prevent duplicates after that window.Production, staging, and sandbox have separate records. Reusing a key in another environment creates independent work. A replay also requires access to the original job.
See credits and plans for charges and errors and retries for request failures.