# impossibl ai api > One API for all AI providers, OpenAI-compatible across OpenAI, Anthropic, Google, xAI, and more. ## Docs - [Agent quickstart: first API call](https://impossibl.com/docs/agent-quickstart.md): Register a funded account and make your first model call in two requests. No signup form, no dashboard, and no human step to get an agent running. - [Add (or replace) a BYOK provider credential](https://impossibl.com/docs/api-reference/add-or-replace-a-byok-provider-credential.md): Verified with one live call before being stored; a bad key or Azure config is rejected with the provider's own error and nothing is persisted. Resubmitting for the same `provider` replaces the existing credential. See the [BYOK guide](/byok) for the per-provider field requirements. - [Buy net credits with a hosted Stripe Invoice](https://impossibl.com/docs/api-reference/buy-net-credits-with-a-hosted-stripe-invoice.md): A fixed 5% platform fee is added to the net credit amount before applicable tax. Provider usage remains billed at provider list prices with no usage markup. - [Complete a claim (called by the frontend after WorkOS sign-in)](https://impossibl.com/docs/api-reference/complete-a-claim-called-by-the-frontend-after-workos-sign-in.md): Binds the agent-created account to the signed-in human. Called by the Impossibl web app after WorkOS AuthKit sign-in, authenticated with the human's WorkOS access token (`Authorization: Bearer `), which the gateway verifies via JWKS. The signed-in verified email must match the e… - [Create a chat completion (OpenAI-compatible)](https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible.md): Drop-in compatible with OpenAI's Chat Completions API. Set `stream: true` for SSE. - [Create a funded account (agent onboarding)](https://impossibl.com/docs/api-reference/create-a-funded-account-agent-onboarding.md): Creates an account, grants the signup bonus, and mints a first API key. The raw key is returned exactly once. - [Create a message (Anthropic Messages API)](https://impossibl.com/docs/api-reference/create-a-message-anthropic-messages-api.md): Drop-in compatible with Anthropic's Messages API. Authenticate with `x-api-key` (or `Authorization: Bearer`). A bare model id like `claude-haiku-4-5` routes to Anthropic; use `provider/model` for others. Set `stream: true` for SSE. - [Create a response (OpenAI Responses API)](https://impossibl.com/docs/api-reference/create-a-response-openai-responses-api.md): Implements OpenAI's Responses API for text. Set `stream: true` for semantic-event SSE. - [Current balance and top-up pricing](https://impossibl.com/docs/api-reference/current-balance-and-top-up-pricing.md) - [Generate images (OpenAI-compatible)](https://impossibl.com/docs/api-reference/generate-images-openai-compatible.md): OpenAI-compatible image generation with `openai/gpt-image-2`. Returns base64-encoded image bytes (never URLs). Billed per token — text input plus image output tokens — from the prepaid balance; there is no BYOK path for image generation yet. - [Get auth.md manifest from the well-known compatibility path](https://impossibl.com/docs/api-reference/get-authmd-manifest-from-the-well-known-compatibility-path.md) - [Get executable agent onboarding manifest](https://impossibl.com/docs/api-reference/get-executable-agent-onboarding-manifest.md) - [Get OAuth protected-resource metadata for agent discovery](https://impossibl.com/docs/api-reference/get-oauth-protected-resource-metadata-for-agent-discovery.md) - [Get the authenticated account and balance](https://impossibl.com/docs/api-reference/get-the-authenticated-account-and-balance.md) - [List API keys (metadata only)](https://impossibl.com/docs/api-reference/list-api-keys-metadata-only.md) - [List available models and pricing](https://impossibl.com/docs/api-reference/list-available-models-and-pricing.md) - [List BYOK provider credentials (metadata only)](https://impossibl.com/docs/api-reference/list-byok-provider-credentials-metadata-only.md): See the [BYOK guide](/byok). Never returns the stored credential itself. - [Live usage stream (SSE)](https://impossibl.com/docs/api-reference/live-usage-stream-sse.md): Server-sent events. On connect, a `snapshot` event with the last 20 request log rows, the credit balance, the server-authoritative month-to-date totals (`monthToDate`: tokens, spentCredits, requests) and their read-time `cutoff`; then one `request` event per settled or failed request. Live `request`… - [Mint a new API key](https://impossibl.com/docs/api-reference/mint-a-new-api-key.md) - [One request with its captured payload](https://impossibl.com/docs/api-reference/one-request-with-its-captured-payload.md) - [Poll a claim ceremony (claim grant)](https://impossibl.com/docs/api-reference/poll-a-claim-ceremony-claim-grant.md): Polls the claim ceremony with `grant_type=urn:workos:agent-auth:grant-type:claim`. Authenticate with the account API key (bearer, or the `claim_token` form field). Returns `authorization_pending` until the human finishes, `expired_token` if the code window closed, `access_denied` if the account was… - [Recent request log](https://impossibl.com/docs/api-reference/recent-request-log.md): Every gateway request including failures, newest first. Rows only, no payloads. - [Recent usage ledger](https://impossibl.com/docs/api-reference/recent-usage-ledger.md) - [Rename an API key](https://impossibl.com/docs/api-reference/rename-an-api-key.md) - [Revoke a BYOK provider credential](https://impossibl.com/docs/api-reference/revoke-a-byok-provider-credential.md) - [Revoke an API key](https://impossibl.com/docs/api-reference/revoke-an-api-key.md) - [Start a claim ceremony (hand the account to a human)](https://impossibl.com/docs/api-reference/start-a-claim-ceremony-hand-the-account-to-a-human.md): Begins the WorkOS auth.md "user claimed flow". Authenticated by the agent's API key; the account claimed is that key's account. Returns an RFC 8628-shaped `user_code` + `verification_uri`. Show them to the human, who signs in with WorkOS as `email` and enters the code; poll POST /oauth2/token until… - [Transcribe a completed audio file](https://impossibl.com/docs/api-reference/transcribe-a-completed-audio-file.md): OpenAI-compatible file transcription with `openai/gpt-transcribe`. Set `stream: true` to receive transcript events over SSE. Successful requests are billed at $0.0045 per audio minute. - [Verify Stripe webhook and credit paid invoices](https://impossibl.com/docs/api-reference/verify-stripe-webhook-and-credit-paid-invoices.md): Handles invoice.paid. This is the wallet crediting source of truth; Supabase Stripe Sync Engine is only a mirror for analytics/reconciliation. - [Audio transcription](https://impossibl.com/docs/audio-transcription.md): Transcribe completed audio files with openai/gpt-transcribe through the OpenAI-compatible audio transcriptions endpoint. - [Audio and video input](https://impossibl.com/docs/audio-video.md): Send audio and video alongside text on Chat Completions, the Responses API, and the Gemini-native endpoint. Output stays text; audio tokens can carry their own rate. - [API keys and authentication](https://impossibl.com/docs/authentication.md): How gateway API keys work, how agents self-register through auth.md, and how a human later claims the account that an agent opened on their behalf. - [Bring your own key (BYOK)](https://impossibl.com/docs/byok.md): Route requests through your own OpenAI, Anthropic, Google, xAI, Z.ai, Bedrock or Azure credentials instead of the shared gateway key, and see how routing precedence resolves. - [Error codes and limitations](https://impossibl.com/docs/errors.md): Every status code the gateway returns, the shape of an error response body, and the features that are not supported yet so you can plan around them. - [Image generation](https://impossibl.com/docs/image-generation.md): Generate images with openai/gpt-image-2 through the OpenAI-compatible images endpoint, billed per token from the same prepaid credit balance. - [SDKs and integrations](https://impossibl.com/docs/integrations.md): Point the OpenAI Python and Node SDKs, Vercel AI SDK, LangChain, the Anthropic SDK or Claude Code at the gateway by changing the base URL and the key. - [One API for all AI providers](https://impossibl.com/docs/introduction.md): A single OpenAI-compatible endpoint that routes to OpenAI, Anthropic, Google, xAI, Z.ai and Azure Foundry models, billed from one prepaid credit balance. - [Supported models and pricing](https://impossibl.com/docs/models.md): Every model the gateway serves, how each request is priced against your credit balance, and how to top up with a hosted Stripe invoice in one call. - [Request logs and usage stream](https://impossibl.com/docs/request-logs.md): Read past requests, fetch a captured payload, page through history with before_id, and stream live usage over SSE as requests complete on the gateway. - [Streaming responses over SSE](https://impossibl.com/docs/streaming.md): Consume Server-Sent Events from Chat Completions, the Responses API and Anthropic Messages, with the exact event shapes each surface sends back. - [Tool calling in relay mode](https://impossibl.com/docs/tool-calling.md): Let a model call your tools on Chat Completions, the Responses API and Anthropic Messages, with full request and response examples for each surface. - [Vision and image input](https://impossibl.com/docs/vision.md): Send images alongside text on Chat Completions, the Responses API and Anthropic Messages. Output stays text, and image tokens are billed as input tokens. ## OpenAPI Specs - [openapi](https://impossibl.com/docs/openapi.yaml)