DocsAPI reference

OpenAPI specification

Model IDs and options in examples are illustrative. Select an available model from GET /v1/models and check its capabilities and current prices.

Performance measurements

Request history shows total duration. Provider tables show time to first token for text, and initial response time for OCR. These measure different parts of a request.

ParameterTypeDefaultDescription
latency_msinteger | null—Total duration, including queueing, uploads, processing and retries. Kept for API compatibility.
ttft_msinteger | null—Time until the model starts returning reasoning, an answer or tool-call output.
generation_msinteger | null—First generated output to last generated output.
upstream_response_msinteger | null—Time until the document service responds. Excludes document processing.
queue_wait_msinteger | null—Time from job submission until processing starts.

GET /v1/usage and request details return these fields. GET /v1/usage/summary adds averages, p50, p95 and sample counts for each measurement. Historical requests, cache hits and failed requests have no provider timing. JSON-only BYOK completions have no TTFT measurement.

Generation speed

Generation speed uses the sum of output tokens minus one per measured request, divided by summed first-to-last output time. It excludes incomplete responses and requests with fewer than two output tokens or zero generation time. Check generation_samples before interpreting tps; zero samples means no measurement.