# Antara > Antara's developer documentation: OpenAI- and Anthropic-compatible model APIs with policies, usage-based billing, and rate limits. - [Introduction](https://docs.antarah.dev/index.md): One API for Antara's models, compatible with the OpenAI and Anthropic SDKs, with policies, credits, and rate limits built in. - [Quickstart](https://docs.antarah.dev/quickstart.md): Create an API key and make your first request. - [Authentication](https://docs.antarah.dev/authentication.md): Project API keys for inference, Admin API keys for policies and administration. - [Models](https://docs.antarah.dev/models.md): Antara's models, their capabilities, and how to read the live catalog. - [SDKs](https://docs.antarah.dev/sdks.md): Use the official OpenAI and Anthropic SDKs with Antara. - [Streaming](https://docs.antarah.dev/guides/streaming.md): Receive output as server-sent events while the model generates it. - [Tool calling](https://docs.antarah.dev/guides/tool-calling.md): Let the model call your functions. - [Structured output](https://docs.antarah.dev/guides/structured-outputs.md): Get JSON that matches a schema. - [Images](https://docs.antarah.dev/guides/images.md): Send images to models that accept them. - [Reasoning](https://docs.antarah.dev/guides/reasoning.md): Control how much a model thinks before it answers, and read its reasoning. - [Policies](https://docs.antarah.dev/guides/policies.md): Check requests and responses against your own rules, and block what you don't allow. - [Decision export](https://docs.antarah.dev/guides/decision-export.md): Send every policy decision to a webhook or an S3-compatible bucket. - [Rate limits](https://docs.antarah.dev/guides/rate-limits.md): Limits by tier, per key, project, and organization, and how to read the headers. - [Billing and credits](https://docs.antarah.dev/guides/billing.md): How usage is priced and charged, and how to cap spend. - [Idempotency](https://docs.antarah.dev/guides/idempotency.md): Retry safely with Idempotency-Key. - [Versioning](https://docs.antarah.dev/guides/versioning.md): What can change without notice, and how deprecations are announced. - [API reference](https://docs.antarah.dev/api-reference/introduction.md): Base URL, authentication, and conventions shared by every endpoint. - [Create a chat completion](https://docs.antarah.dev/api-reference/inference/chat-completions.md) - [Create a response](https://docs.antarah.dev/api-reference/inference/responses.md) - [Create a message](https://docs.antarah.dev/api-reference/inference/messages.md) - [Count tokens](https://docs.antarah.dev/api-reference/inference/count-tokens.md) - [List models](https://docs.antarah.dev/api-reference/models/list-models.md) - [Get credits](https://docs.antarah.dev/api-reference/models/get-credits.md) - [List plans](https://docs.antarah.dev/api-reference/models/list-plans.md) - [List policies](https://docs.antarah.dev/api-reference/policies/list-policies.md) - [Create a policy](https://docs.antarah.dev/api-reference/policies/create-policy.md) - [Get a policy](https://docs.antarah.dev/api-reference/policies/get-policy.md) - [Update a policy draft](https://docs.antarah.dev/api-reference/policies/update-policy.md) - [Delete a policy](https://docs.antarah.dev/api-reference/policies/delete-policy.md) - [Publish a policy](https://docs.antarah.dev/api-reference/policies/publish-policy.md) - [Pause a policy](https://docs.antarah.dev/api-reference/policies/pause-policy.md) - [Resume a policy](https://docs.antarah.dev/api-reference/policies/resume-policy.md) - [List policy versions](https://docs.antarah.dev/api-reference/policies/list-policy-versions.md) - [Get a policy version](https://docs.antarah.dev/api-reference/policies/get-policy-version.md) - [List a project's effective policies](https://docs.antarah.dev/api-reference/policies/list-effective-policies.md) - [Get the organization](https://docs.antarah.dev/api-reference/organization/get-organization.md) - [List projects](https://docs.antarah.dev/api-reference/organization/list-projects.md) - [Create a project](https://docs.antarah.dev/api-reference/organization/create-project.md) - [Get a project](https://docs.antarah.dev/api-reference/organization/get-project.md) - [Rename a project](https://docs.antarah.dev/api-reference/organization/rename-project.md) - [Archive a project](https://docs.antarah.dev/api-reference/organization/archive-project.md) - [List project API keys](https://docs.antarah.dev/api-reference/api-keys/list-project-keys.md) - [Create a project API key](https://docs.antarah.dev/api-reference/api-keys/create-project-key.md) - [Get a project API key](https://docs.antarah.dev/api-reference/api-keys/get-project-key.md) - [Revoke a project API key](https://docs.antarah.dev/api-reference/api-keys/revoke-project-key.md) - [List Admin API keys](https://docs.antarah.dev/api-reference/api-keys/list-admin-keys.md) - [Create an Admin API key](https://docs.antarah.dev/api-reference/api-keys/create-admin-key.md) - [Get an Admin API key](https://docs.antarah.dev/api-reference/api-keys/get-admin-key.md) - [Revoke an Admin API key](https://docs.antarah.dev/api-reference/api-keys/revoke-admin-key.md) - [Get the balance](https://docs.antarah.dev/api-reference/billing/get-balance.md) - [Get the organization's spend limit](https://docs.antarah.dev/api-reference/billing/get-org-spend-limit.md) - [Set the organization's spend limit](https://docs.antarah.dev/api-reference/billing/set-org-spend-limit.md) - [Remove the organization's spend limit](https://docs.antarah.dev/api-reference/billing/remove-org-spend-limit.md) - [Get a project's spend limit](https://docs.antarah.dev/api-reference/billing/get-project-spend-limit.md) - [Set a project's spend limit](https://docs.antarah.dev/api-reference/billing/set-project-spend-limit.md) - [Remove a project's spend limit](https://docs.antarah.dev/api-reference/billing/remove-project-spend-limit.md) - [Get completions usage](https://docs.antarah.dev/api-reference/billing/usage.md) - [Get costs](https://docs.antarah.dev/api-reference/billing/costs.md) - [Get the organization](https://docs.antarah.dev/api-reference/get-the-organization.md) - [List projects (oldest first, so the default project leads)](https://docs.antarah.dev/api-reference/list-projects-oldest-first-so-the-default-project-leads.md) - [Create a project](https://docs.antarah.dev/api-reference/create-a-project.md) - [List Admin API keys (newest first, never with `value`)](https://docs.antarah.dev/api-reference/list-admin-api-keys-newest-first-never-with-`value`.md) - [Create an Admin API key with a subset of your permissions (`value` is returned once)](https://docs.antarah.dev/api-reference/create-an-admin-api-key-with-a-subset-of-your-permissions-`value`-is-returned-once.md) - [Get an Admin API key](https://docs.antarah.dev/api-reference/get-an-admin-api-key.md) - [Revoke an Admin API key (revoking twice → 200)](https://docs.antarah.dev/api-reference/revoke-an-admin-api-key-revoking-twice-→-200.md) - [Get a project](https://docs.antarah.dev/api-reference/get-a-project.md) - [Rename a project (allowed in any status)](https://docs.antarah.dev/api-reference/rename-a-project-allowed-in-any-status.md) - [Archive a project and revoke all of its API keys](https://docs.antarah.dev/api-reference/archive-a-project-and-revoke-all-of-its-api-keys.md) - [List a project's API keys (newest first, never with `value`)](https://docs.antarah.dev/api-reference/list-a-projects-api-keys-newest-first-never-with-`value`.md) - [Create a project API key (`value` is returned once)](https://docs.antarah.dev/api-reference/create-a-project-api-key-`value`-is-returned-once.md) - [Get a project API key](https://docs.antarah.dev/api-reference/get-a-project-api-key.md) - [Revoke a project API key (revoking twice → 200)](https://docs.antarah.dev/api-reference/revoke-a-project-api-key-revoking-twice-→-200.md) - [Create a chat completion (OpenAI Chat Completions); `stream: true` answers with server-sent events](https://docs.antarah.dev/api-reference/create-a-chat-completion-openai-chat-completions;-`stream:-true`-answers-with-server-sent-events.md) - [Create a model response (OpenAI Responses, stateless); `stream: true` answers with `response.*` server-sent events](https://docs.antarah.dev/api-reference/create-a-model-response-openai-responses-stateless;-`stream:-true`-answers-with-`response*`-server-sent-events.md) - [Create a message (Anthropic Messages, translated to the upstream's Chat Completions); `stream: true` answers with server-sent events](https://docs.antarah.dev/api-reference/create-a-message-anthropic-messages-translated-to-the-upstreams-chat-completions;-`stream:-true`-answers-with-server-sent-events.md) - [Count a Messages request's input tokens (cached 10 min by body; not billed; counts toward RPM only)](https://docs.antarah.dev/api-reference/count-a-messages-requests-input-tokens-cached-10-min-by-body;-not-billed;-counts-toward-rpm-only.md) - [List the models this project can call (catalog order)](https://docs.antarah.dev/api-reference/list-the-models-this-project-can-call-catalog-order.md) - [Lifetime credits granted and used by the organization, in USD (may lag ≤ 5 s)](https://docs.antarah.dev/api-reference/lifetime-credits-granted-and-used-by-the-organization-in-usd-may-lag-≤-5-s.md) - [Plans and their monthly price, credit, tier, and discount (public)](https://docs.antarah.dev/api-reference/plans-and-their-monthly-price-credit-tier-and-discount-public.md) - [Available, reserved, and owed USD, and standing](https://docs.antarah.dev/api-reference/available-reserved-and-owed-usd-and-standing.md) - [The organization's monthly spend limit](https://docs.antarah.dev/api-reference/the-organizations-monthly-spend-limit.md) - [Create or replace the organization's monthly spend limit](https://docs.antarah.dev/api-reference/create-or-replace-the-organizations-monthly-spend-limit.md) - [Remove the organization's monthly spend limit](https://docs.antarah.dev/api-reference/remove-the-organizations-monthly-spend-limit.md) - [The project's monthly spend limit](https://docs.antarah.dev/api-reference/the-projects-monthly-spend-limit.md) - [Create or replace the project's monthly spend limit](https://docs.antarah.dev/api-reference/create-or-replace-the-projects-monthly-spend-limit.md) - [Remove the project's monthly spend limit](https://docs.antarah.dev/api-reference/remove-the-projects-monthly-spend-limit.md) - [List policies (summaries)](https://docs.antarah.dev/api-reference/list-policies-summaries.md) - [Create a draft policy](https://docs.antarah.dev/api-reference/create-a-draft-policy.md) - [A policy with its draft and published version](https://docs.antarah.dev/api-reference/a-policy-with-its-draft-and-published-version.md) - [Delete a policy (decisions keep pointing at it)](https://docs.antarah.dev/api-reference/delete-a-policy-decisions-keep-pointing-at-it.md) - [Edit the draft (optimistic `revision`)](https://docs.antarah.dev/api-reference/edit-the-draft-optimistic-`revision`.md) - [Publish the draft as a new version](https://docs.antarah.dev/api-reference/publish-the-draft-as-a-new-version.md) - [Pause a published policy](https://docs.antarah.dev/api-reference/pause-a-published-policy.md) - [Resume a paused policy in its current version's mode](https://docs.antarah.dev/api-reference/resume-a-paused-policy-in-its-current-versions-mode.md) - [Published versions, newest first (no rule text)](https://docs.antarah.dev/api-reference/published-versions-newest-first-no-rule-text.md) - [One published version](https://docs.antarah.dev/api-reference/one-published-version.md) - [Published policies that apply to this project](https://docs.antarah.dev/api-reference/published-policies-that-apply-to-this-project.md) - [Token and request usage in time buckets (ascending)](https://docs.antarah.dev/api-reference/token-and-request-usage-in-time-buckets-ascending.md) - [Costs in daily UTC buckets (ascending)](https://docs.antarah.dev/api-reference/costs-in-daily-utc-buckets-ascending.md) - [Errors](https://docs.antarah.dev/guides/errors.md): Error shapes, retries, and every error code. - [invalid_request](https://docs.antarah.dev/errors/invalid_request.md): Invalid request (HTTP 400) - [unsupported_parameter](https://docs.antarah.dev/errors/unsupported_parameter.md): Unsupported parameter (HTTP 400) - [unsupported_modality](https://docs.antarah.dev/errors/unsupported_modality.md): Unsupported modality (HTTP 400) - [context_length_exceeded](https://docs.antarah.dev/errors/context_length_exceeded.md): Context length exceeded (HTTP 400) - [unknown_policy](https://docs.antarah.dev/errors/unknown_policy.md): Unknown policy (HTTP 400) - [upstream_invalid_request](https://docs.antarah.dev/errors/upstream_invalid_request.md): Upstream rejected the request (HTTP 400) - [invalid_cursor](https://docs.antarah.dev/errors/invalid_cursor.md): Invalid cursor (HTTP 400) - [missing_credentials](https://docs.antarah.dev/errors/missing_credentials.md): Missing credentials (HTTP 401) - [invalid_api_key](https://docs.antarah.dev/errors/invalid_api_key.md): Invalid API key (HTTP 401) - [invalid_admin_credential](https://docs.antarah.dev/errors/invalid_admin_credential.md): Invalid admin credential (HTTP 401) - [session_expired](https://docs.antarah.dev/errors/session_expired.md): Session expired (HTTP 401) - [insufficient_credits](https://docs.antarah.dev/errors/insufficient_credits.md): Insufficient credits (HTTP 402) - [spend_limit_reached](https://docs.antarah.dev/errors/spend_limit_reached.md): Spend limit reached (HTTP 402) - [permission_denied](https://docs.antarah.dev/errors/permission_denied.md): Permission denied (HTTP 403) - [mfa_required](https://docs.antarah.dev/errors/mfa_required.md): Two-factor authentication required (HTTP 403) - [organization_blocked](https://docs.antarah.dev/errors/organization_blocked.md): Organization blocked (HTTP 403) - [model_locked](https://docs.antarah.dev/errors/model_locked.md): Model locked (HTTP 403) - [not_found](https://docs.antarah.dev/errors/not_found.md): Not found (HTTP 404) - [model_not_found](https://docs.antarah.dev/errors/model_not_found.md): Model not found (HTTP 404) - [idempotency_conflict](https://docs.antarah.dev/errors/idempotency_conflict.md): Idempotency key conflict (HTTP 409) - [idempotency_in_progress](https://docs.antarah.dev/errors/idempotency_in_progress.md): Idempotent request in progress (HTTP 409) - [idempotency_expired](https://docs.antarah.dev/errors/idempotency_expired.md): Idempotency key expired (HTTP 409) - [idempotency_replay_unavailable](https://docs.antarah.dev/errors/idempotency_replay_unavailable.md): Idempotent replay unavailable (HTTP 409) - [policy_revision_conflict](https://docs.antarah.dev/errors/policy_revision_conflict.md): Policy revision conflict (HTTP 409) - [policy_state_conflict](https://docs.antarah.dev/errors/policy_state_conflict.md): Policy state conflict (HTTP 409) - [cannot_archive_default_project](https://docs.antarah.dev/errors/cannot_archive_default_project.md): Default project can't be archived (HTTP 409) - [project_archived](https://docs.antarah.dev/errors/project_archived.md): Project archived (HTTP 409) - [sole_owner](https://docs.antarah.dev/errors/sole_owner.md): Sole owner (HTTP 409) - [already_member](https://docs.antarah.dev/errors/already_member.md): Already a member (HTTP 409) - [api_key_inactive](https://docs.antarah.dev/errors/api_key_inactive.md): API key inactive (HTTP 409) - [already_subscribed](https://docs.antarah.dev/errors/already_subscribed.md): Already subscribed (HTTP 409) - [no_subscription](https://docs.antarah.dev/errors/no_subscription.md): No active plan (HTTP 409) - [payment_method_in_use](https://docs.antarah.dev/errors/payment_method_in_use.md): Payment method in use (HTTP 409) - [model_retired](https://docs.antarah.dev/errors/model_retired.md): Model retired (HTTP 410) - [invitation_expired](https://docs.antarah.dev/errors/invitation_expired.md): Invitation expired (HTTP 410) - [payload_too_large](https://docs.antarah.dev/errors/payload_too_large.md): Payload too large (HTTP 413) - [unsupported_media_type](https://docs.antarah.dev/errors/unsupported_media_type.md): Unsupported media type (HTTP 415) - [validation_error](https://docs.antarah.dev/errors/validation_error.md): Validation error (HTTP 422) - [invalid_policy](https://docs.antarah.dev/errors/invalid_policy.md): Invalid policy (HTTP 422) - [invalid_policy_project](https://docs.antarah.dev/errors/invalid_policy_project.md): Invalid policy project (HTTP 422) - [invalid_time_range](https://docs.antarah.dev/errors/invalid_time_range.md): Invalid time range (HTTP 422) - [rate_limited](https://docs.antarah.dev/errors/rate_limited.md): Rate limited (HTTP 429) - [internal_error](https://docs.antarah.dev/errors/internal_error.md): Internal error (HTTP 500) - [upstream_error](https://docs.antarah.dev/errors/upstream_error.md): Upstream error (HTTP 502) - [service_unavailable](https://docs.antarah.dev/errors/service_unavailable.md): Service unavailable (HTTP 503) - [upstream_unavailable](https://docs.antarah.dev/errors/upstream_unavailable.md): Upstream unavailable (HTTP 503) - [policy_evaluation_unavailable](https://docs.antarah.dev/errors/policy_evaluation_unavailable.md): Policy evaluation unavailable (HTTP 503) - [credit_balance_unavailable](https://docs.antarah.dev/errors/credit_balance_unavailable.md): Credit balance unavailable (HTTP 503) - [upstream_timeout](https://docs.antarah.dev/errors/upstream_timeout.md): Upstream timeout (HTTP 504) ## OpenAPI Specs - [openapi](https://api.antarah.dev/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.