PineRouterDocs
GuidesModelsAPI referenceApps

Keys, billing and limits

Authentication, how you are charged, rate limits, file retention and errors.

Authentication

Send your key in the Authorization header on every request:

Authorization: Bearer sk-...

Keys are created and deleted in the console under API keys. You can give a key its own spending limit, an expiry date and a list of allowed models. Delete a key straight away if it leaks.

Billing

  • Prepaid. Each request is charged from your balance at the price on the Models page.
  • Text is charged per token, after the reply.
  • Media jobs reserve the expected cost plus 20% when they start, then settle at the real cost when they finish; the difference comes back to your balance. A failed job costs nothing.
  • If a job turns out to cost more than it reserved, your balance can go below zero. New requests then wait until you top up.
  • See your balance with GET /v1/dashboard/billing/subscription and spending with GET /v1/dashboard/billing/usage, or in the console.

Rate limits

Each account may send 120 requests a minute, 60 of them successful. Over the limit you get HTTP 429; wait and retry. Need more? Contact us. Details and backoff code: Rate limits.

Files and results

  • Pass input files (images, audio, video) as public https:// links. Files you upload in the Studio are kept for 1 day.
  • Result links stay available for 7 days, then the files are deleted. Download anything you want to keep.

Errors

Errors come back with an HTTP status and a JSON body: {"error": {"message": "...", "type": "...", "code": "..."}} (jobs: {"code": 400, "msg": "..."}).

StatusMeaningWhat to do
400The request is invalid or breaks the content rulesFix the request; content-rules refusals count against your account
401Missing or wrong keyCheck the Authorization header
403Balance too low, or the key may not use this modelTop up, or check the key's settings
429Rate limitWait and retry with backoff
500, 502, 503The model failed, or we are briefly overloadedRetry; a failed job is not charged

Every status, both body shapes and retry rules: Errors.

Content rules

Our Terms apply. Safety filters are always on. Sexual content involving minors is refused, and repeated refusals disable an account automatically.