Skip to contentSkip to content

API Access

Get started

  1. Create an API key in the customer portal.
  2. Inject it into a server environment as API_KEY.
  3. Call /v1/models to select a currently available model.
  4. Follow the quickstart to send a request.

Authentication safety

The data API uses Authorization: Bearer $API_KEY. Never put a Direct API key in a browser, mobile app, Git repository, image, log, or error report.

Migration and compatibility

See migrating from the OpenAI SDK or migrating from the Anthropic SDK. Protocol compatibility does not guarantee identical model behavior, so validate outputs and error handling after migration.

Timeouts, limits, and retries

Configure connection, first-byte, and whole-request timeouts. Apply backoff after 429 responses. Use an explicit idempotency policy when retrying POST requests.

For diagnosis, retain the HTTP status, safe error code, and X-Request-Id. Do not log prompts or responses.

Last updated: