Skip to content

Usage — API reference

View as Markdown

Credits, storage and egress for the current period.

GET /v1/limits

Machine-readable capabilities: supported formats with their byte ceilings, the operation catalogue with class and per-megabyte pricing, processing limits, and per-organization velocity ceilings. Read from the same constants the enforcing code reads.

Responses
StatusDescription
200The current limits.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

POST /v1/estimate

The same arithmetic job acceptance runs: the answer is the number a created job would reserve. Naturally idempotent — the same question always gets the same answer.

Parameters
NameInRequirementDescription
Idempotency-KeyheaderRequiredClient-generated key, scoped to (organization, endpoint) and retained 24 hours. A replay with the same body returns the stored response without re-executing or re-billing; a replay with a different body returns 409.
Request body
FieldTypeRequirementDescription
operationstringRequired
byte_sizeintegerRequired
Responses
StatusDescription
200The estimate.
400Codes: invalid_request, unsupported_file, file_too_large, corrupted_file, encrypted_file, unsupported_operation.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

GET /v1/usage

Consumption for the current billing period. This is the authoritative record — never derive usage from gateway throttling counters.

Responses
StatusDescription
200Usage for the current period.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.