Skip to main content

Base URL

Base URL
Every path below is relative to it. Organizations pinned to a region use that region’s base URL instead, see Data residency.

Authentication

Send an inference API key as a bearer token:
  • Inference keys start with sk-prl-infapi-; create them on the API Keys page. Management keys (sk-prl-mgmt-) cannot call models.
  • /models also accepts the key in an x-api-key header.

Endpoints

Requests

  • Bodies are JSON objects, up to 20 MiB. They may be compressed with gzip, br, zstd, or deflate (set Content-Encoding).
  • Every response carries an X-Request-ID header. Send your own UUID in X-Request-ID to use it as the ID. Include the ID when you contact support.
  • Streaming responses are server-sent events. An error after the stream starts arrives as an event in the stream, not as an HTTP status, see Streaming.

Errors

Errors are JSON in OpenAI’s shape, with the request ID in the body. type is one of invalid_request_error, authentication_error, permission_error, rate_limit_error, or api_error, and code is present only when set.

Status codes

Retry 429 and 5xx with exponential backoff and jitter, honoring Retry-After when present. A 400, 401, 402, 403, or 404 fails the same way until the request, key, balance, or endpoint changes.

Rate limits

Limits apply per organization and model: requests, input tokens, and output tokens per minute, and concurrent requests. Your plan sets them, see Plans & rate limits. Over a limit, a request gets 429 with a Retry-After header in seconds.

Anthropic-compatible endpoints

  • /messages and /messages/count_tokens accept the key in an x-api-key header, as the Anthropic SDK sends it, or as a bearer token. If you send both headers, they must carry the same key.
  • They require an anthropic-version header (any single value, for example 2023-06-01) and Content-Type: application/json.
  • Their errors use Anthropic’s shape, and their responses also carry the ID in a request-id header: