Skip to content

Authentication and errors

API keys

Send your key as Authorization: Bearer YOUR_API_KEY. The x-api-key header also works. Create keys on the API keys page or with the API keys API.

Credit ID

Your credit ID identifies your PPQ account and its balance. It is shown on Account activity ("Your credit ID is…"), and POST /accounts/create returns a new one together with an API key. These account APIs accept it:

APIHow to send it
x-credit-id header (required)
credit_id in the request body
credit_id query parameter

Anyone who has your credit ID can spend your balance and manage your API keys. Keep it secret, like a password, and never put it in client-side code.

Pay per request

Data enrichment, image generation, image editing and video generation can be paid per request with Bitcoin Lightning, without an account. See 402 payments.

Errors

  • Insufficient balance returns 402 Payment Required, on Chat completions and the Responses API alike.
  • Error bodies differ between endpoints. Some return {"error": {"message": "..."}}, others {"error": "...", "message": "..."}, so read the message from whichever field is present.
  • Feature errors: PII redaction returns stable error.code values, and a routing suffix for a variant the model lacks returns no endpoints found.
  • Failed requests are logged in Query history with an error_code and http_status.