# airmux > A self-hosted LLM gateway with provider routing, scoped credentials, policies, and usage accounting. - [airmux](https://docs.airmux.ai/docs/index.md): Run one self-hosted endpoint for LLM applications across providers, with routing, access controls, and usage accounting built in. - [Quickstart](https://docs.airmux.ai/docs/quickstart.md): Run the full airmux platform, send a real model request, find its cost in the webapp, and enforce your first workspace policy. - [Use the CLI](https://docs.airmux.ai/docs/guides/cli.md): Sign in to airmux and manage workspaces, credentials, inference keys, and usage from the command line. - [Manage users and access](https://docs.airmux.ai/docs/guides/user-management.md): Create accounts, invite organization members, assign roles, and control public signup. - [Use an SDK](https://docs.airmux.ai/docs/guides/sdks.md): Connect common LLM SDKs to airmux with an inference key and gateway model ID. - [Workspace policies](https://docs.airmux.ai/docs/policies.md): Configure who a policy targets, which requests it matches, and the actions airmux applies. - [Create a workspace policy](https://docs.airmux.ai/docs/guides/policy-workflow.md): Create a self-contained policy and verify it from the CLI. - [Create and audit a budget](https://docs.airmux.ai/docs/guides/budgets.md): Set a workspace spending limit and inspect recorded spend with the CLI. - [Model routing and failover](https://docs.airmux.ai/docs/features/model-routing.md): Route catalog model IDs across provider families, select healthy credentials, and define bounded fallback plans. - [Provider credentials](https://docs.airmux.ai/docs/features/provider-credentials.md): Store upstream API keys at instance, organization, or workspace scope and control which requests may use them. - [Usage and activity](https://docs.airmux.ai/docs/features/usage.md): Inspect model usage, cost, latency, request status, gateway health, and audited management changes. - [Deployment overview](https://docs.airmux.ai/docs/deployment/index.md): Choose an airmux or split deployment and identify the required database, state, network, and public URL. - [Docker Compose](https://docs.airmux.ai/docs/deployment/docker.md): Run the airmux image and Postgres with persistent named volumes. - [Gateway only](https://docs.airmux.ai/docs/deployment/gateway.md): Run the inference gateway from local files without Postgres or a control plane. - [Separate services and scale gateways](https://docs.airmux.ai/docs/deployment/scaling.md): Run the webapp, control plane, and multiple data planes independently with distinct persistent state. - [Security checklist](https://docs.airmux.ai/docs/deployment/security.md): Harden a public airmux deployment and protect its management, inference, provider, and state credentials. - [OpenTelemetry](https://docs.airmux.ai/docs/deployment/opentelemetry.md): Export airmux metrics through OTLP or scrape Prometheus endpoints, and choose useful alerts. - [Production operations](https://docs.airmux.ai/docs/deployment/operations.md): Monitor readiness, preserve state, update safely, and diagnose control-plane or gateway failures. - [Upgrade and rollback](https://docs.airmux.ai/docs/deployment/upgrades.md): Replace an airmux release safely, verify the new deployment, and restore a consistent recovery point when rollback is necessary. - [Architecture](https://docs.airmux.ai/docs/concepts/architecture.md): Understand the webapp, control plane, data plane, Postgres, secret store, and configuration flow. - [Canonical model](https://docs.airmux.ai/docs/concepts/canonical-model.md): See how caller dialects and provider families cross one typed request and response model. - [Authentication and scopes](https://docs.airmux.ai/docs/concepts/authentication.md): Distinguish browser sessions, management keys, inference keys, principals, roles, and tenancy scopes. - [Bundles and consistency](https://docs.airmux.ai/docs/concepts/bundles.md): Understand how management changes become immutable gateway snapshots and what happens during outages. - [Request lifecycle](https://docs.airmux.ai/docs/concepts/request-lifecycle.md): Follow an inference request from authentication through policy, translation, streaming, and usage export. - [Development](https://docs.airmux.ai/docs/development.md): Set up airmux, make and verify a change, open a pull request, and publish a release. - [Inference API overview](https://docs.airmux.ai/docs/reference/inference.md): Choose an inference surface, authenticate a request, and understand the shared routing behavior. - [Chat Completions](https://docs.airmux.ai/docs/reference/chat-completions.md): Reference the Chat Completions-compatible request, response, streaming, and error behavior. - [Responses](https://docs.airmux.ai/docs/reference/responses.md): Reference the Responses-compatible request fields, output items, restrictions, and streaming events. - [Messages](https://docs.airmux.ai/docs/reference/messages.md): Reference the Messages-compatible request, response, thinking, tools, structured output, and SSE behavior. - [Errors](https://docs.airmux.ai/docs/reference/errors.md): Handle stable gateway error codes, provider errors, and failures that arrive after streaming begins. - [CLI reference](https://docs.airmux.ai/docs/reference/cli.md): Reference airmux CLI contexts, environment precedence, output formats, and resource commands. - [Configuration reference](https://docs.airmux.ai/docs/reference/configuration.md): Reference Docker variables, runtime YAML sections, references, bundle sources, event outboxes, budget backends, and secret stores. - [Models and providers](https://docs.airmux.ai/docs/reference/models-and-providers.md): Understand catalog model IDs, provider profiles, modalities, capabilities, prices, and parameter support. - [Management API overview](https://docs.airmux.ai/docs/reference/management-api.md): Authenticate to the control plane, address tenant scopes, unwrap envelopes, handle errors, and browse generated endpoints. - [Login](https://docs.airmux.ai/api-reference/auth/login.md): Authenticate a human user and start a browser session. - [Sign Up](https://docs.airmux.ai/api-reference/auth/sign-up.md): Create a human account and start a browser session. - [Logout](https://docs.airmux.ai/api-reference/auth/logout.md): End the current browser session and clear its cookie. - [Get Current User](https://docs.airmux.ai/api-reference/auth/get-current-user.md): Return the authenticated human user and the organizations visible to this credential. - [Get Effective Permissions](https://docs.airmux.ai/api-reference/auth/get-effective-permissions.md): Return the effective permissions this credential can exercise at the requested scope. - [Change Password](https://docs.airmux.ai/api-reference/auth/change-password.md): Replace the authenticated user's password after verifying the current password. - [Start CLI Authorization](https://docs.airmux.ai/api-reference/auth/start-cli-authorization.md): Create a short-lived device authorization for a CLI sign-in. - [Get CLI Authorization Request](https://docs.airmux.ai/api-reference/auth/get-cli-authorization-request.md): Return the client and expiry details for a device authorization code. - [Approve CLI Authorization](https://docs.airmux.ai/api-reference/auth/approve-cli-authorization.md): Approve a device authorization for instance access or one visible organization. - [Poll CLI Authorization](https://docs.airmux.ai/api-reference/auth/poll-cli-authorization.md): Return pending status or deliver the approved scoped management key once. - [Get Current Enrollment](https://docs.airmux.ai/api-reference/enrollment/get-current-enrollment.md): List the current user's visible organizations, personal organization, and pending invitations. - [Create Personal Organization](https://docs.airmux.ai/api-reference/enrollment/create-personal-organization.md): Create the current user's personal organization and make them its owner. - [Preview Invitation](https://docs.airmux.ai/api-reference/enrollment/preview-invitation.md): Preview the organization and optional workspace named by a shared invitation secret. - [Accept Invitation](https://docs.airmux.ai/api-reference/enrollment/accept-invitation.md): Accept an invitation whose email matches the signed-in human account. - [List Organizations](https://docs.airmux.ai/api-reference/instance-organizations/list-organizations.md): List every organization on the instance. - [Create Organization](https://docs.airmux.ai/api-reference/instance-organizations/create-organization.md): Create an organization. - [Get Org Summary](https://docs.airmux.ai/api-reference/instance-organizations/get-org-summary.md): Count all organizations on the instance, independent of collection pagination. - [Create Service Account](https://docs.airmux.ai/api-reference/instance-users/create-service-account.md): Create a machine principal with an optional instance role. - [Create Instance Service Account Management Key](https://docs.airmux.ai/api-reference/instance-users/create-instance-service-account-management-key.md): Issue an instance key for an instance-managed service account. - [Get User](https://docs.airmux.ai/api-reference/instance-users/get-user.md): Return one human user or service account and its organization memberships. - [Delete User](https://docs.airmux.ai/api-reference/instance-users/delete-user.md): Delete a principal and its login identities, sessions, and control-plane management keys. - [List Users](https://docs.airmux.ai/api-reference/instance-users/list-users.md): List human users and service accounts across the instance. - [Change Instance Role](https://docs.airmux.ai/api-reference/instance-users/change-instance-role.md): Required permission: `principals.manage`. - [List Instance Management Keys](https://docs.airmux.ai/api-reference/instance-management-keys/list-instance-management-keys.md): List management keys across all scopes, optionally filtered by principal. - [Create Instance Management Key](https://docs.airmux.ai/api-reference/instance-management-keys/create-instance-management-key.md): Create an instance-scoped management key and return its token once. - [Revoke Management Key](https://docs.airmux.ai/api-reference/instance-management-keys/revoke-management-key.md): Revoke an management key and every key delegated from it. - [Update Management Key Permissions](https://docs.airmux.ai/api-reference/instance-management-keys/update-management-key-permissions.md): Required permission: `management-keys.issue`. - [Get Instance Model Catalog](https://docs.airmux.ai/api-reference/instance-model-catalog/get-instance-model-catalog.md): Return the provider and model catalog at instance scope. - [Apply Instance Model Catalog](https://docs.airmux.ai/api-reference/instance-model-catalog/apply-instance-model-catalog.md): Apply a complete provider and model taxonomy atomically. - [Create or Update Provider](https://docs.airmux.ai/api-reference/instance-model-catalog/create-or-update-provider.md): Create a provider or replace the catalog entry with the same name. - [Create or Update Model](https://docs.airmux.ai/api-reference/instance-model-catalog/create-or-update-model.md): Create a model or replace the catalog entry with the same name. - [List Instance Provider Credentials](https://docs.airmux.ai/api-reference/instance-provider-credentials/list-instance-provider-credentials.md): List provider credentials owned by the instance. - [Create Instance Provider Credential](https://docs.airmux.ai/api-reference/instance-provider-credentials/create-instance-provider-credential.md): Store a provider API key available to every organization on the instance. - [List Data Planes](https://docs.airmux.ai/api-reference/data-plane-instances/list-data-planes.md): List data-plane instances by most recent heartbeat. - [List Instance Activity](https://docs.airmux.ai/api-reference/instance-activity/list-instance-activity.md): List the most recent audited changes across the instance. - [Get Instance Claim Status](https://docs.airmux.ai/api-reference/oss/get-instance-claim-status.md): Return whether a human account has claimed this deployment. - [Get Organization](https://docs.airmux.ai/api-reference/organization-settings/get-organization.md): Return one organization. - [Update Organization](https://docs.airmux.ai/api-reference/organization-settings/update-organization.md): Update an organization's mutable fields. - [Delete Organization](https://docs.airmux.ai/api-reference/organization-settings/delete-organization.md): Delete an organization and its workspaces, keys, credentials, memberships, and bundles. - [List Organization Members](https://docs.airmux.ai/api-reference/organization-members/list-organization-members.md): List the human users and service accounts that belong to an organization. - [Add Organization Member](https://docs.airmux.ai/api-reference/organization-members/add-organization-member.md): Add a principal to an organization or update its organization role. - [Remove Organization Member](https://docs.airmux.ai/api-reference/organization-members/remove-organization-member.md): Remove a principal from an organization and its workspaces. - [Create Organization Service Account](https://docs.airmux.ai/api-reference/organization-service-accounts/create-organization-service-account.md): Create an organization-managed service account and its first management key. - [Create Org Service Account Management Key](https://docs.airmux.ai/api-reference/organization-service-accounts/create-org-service-account-management-key.md): Issue a replacement key for an organization-managed service account. - [Delete Organization Service Account](https://docs.airmux.ai/api-reference/organization-service-accounts/delete-organization-service-account.md): Delete an organization-managed service account and its control-plane credentials. - [List Organization Invitations](https://docs.airmux.ai/api-reference/organization-invitations/list-organization-invitations.md): List pending and expired invitations without returning their secret URLs. - [Create Organization Invitation](https://docs.airmux.ai/api-reference/organization-invitations/create-organization-invitation.md): Create an email-bound organization invitation and return its shareable URL once. - [Reissue Organization Invitation](https://docs.airmux.ai/api-reference/organization-invitations/reissue-organization-invitation.md): Replace a pending or expired invitation URL and invalidate its previous secret. - [Revoke Organization Invitation](https://docs.airmux.ai/api-reference/organization-invitations/revoke-organization-invitation.md): Revoke an invitation without changing any membership already granted. - [List Workspaces](https://docs.airmux.ai/api-reference/organization-workspaces/list-workspaces.md): List workspaces the caller can read in an organization. - [Create Workspace](https://docs.airmux.ai/api-reference/organization-workspaces/create-workspace.md): Create a workspace and make the creator its first admin when they belong to the organization. - [List Org Management Keys](https://docs.airmux.ai/api-reference/organization-management-keys/list-org-management-keys.md): List organization- and workspace-scoped management keys within an organization. - [Create Org Management Key](https://docs.airmux.ai/api-reference/organization-management-keys/create-org-management-key.md): Create an organization-scoped management key and return its token once. - [Revoke Management Key](https://docs.airmux.ai/api-reference/instance-management-keys/revoke-management-key.md): Revoke an management key and every key delegated from it. - [Update Management Key Permissions](https://docs.airmux.ai/api-reference/instance-management-keys/update-management-key-permissions.md): Required permission: `management-keys.issue`. - [List Org Provider Credentials](https://docs.airmux.ai/api-reference/organization-provider-credentials/list-org-provider-credentials.md): List provider credentials owned by an organization, including its workspace credentials. - [Create Org Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/create-org-provider-credential.md): Store a provider API key for every workspace in an organization. - [Get Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/get-provider-credential.md): Return provider credential metadata without its secret value. - [Update Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/update-provider-credential.md): Update a provider credential's priority or enabled state. - [Delete Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/delete-provider-credential.md): Delete provider credential metadata and its stored secret value. - [Rotate Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/rotate-provider-credential.md): Replace a provider credential's secret value. - [List Org Events](https://docs.airmux.ai/api-reference/organization-usage-events/list-org-events.md): List usage events across an organization with cursor pagination. - [Get Usage Report](https://docs.airmux.ai/api-reference/organization-reports/get-usage-report.md): Required permission: `usage.read`. - [Get Attribution Report](https://docs.airmux.ai/api-reference/organization-reports/get-attribution-report.md): Required permission: `usage.read`. - [Get Report Filter Options](https://docs.airmux.ai/api-reference/organization-reports/get-report-filter-options.md): Required permission: `usage.read`. - [List Usage Requests](https://docs.airmux.ai/api-reference/organization-reports/list-usage-requests.md): Required permission: `usage.read`. - [Get Usage Request](https://docs.airmux.ai/api-reference/organization-reports/get-usage-request.md): Required permission: `usage.read`. - [List Organization Activity](https://docs.airmux.ai/api-reference/organization-activity/list-organization-activity.md): List the most recent audited changes in an organization. - [Get Organization Model Catalog](https://docs.airmux.ai/api-reference/organization-model-catalog/get-organization-model-catalog.md): Return the provider and model catalog available to an organization. - [Get Workspace](https://docs.airmux.ai/api-reference/workspace-settings/get-workspace.md): Return a workspace by ID or slug. - [Update Workspace](https://docs.airmux.ai/api-reference/workspace-settings/update-workspace.md): Update a workspace's name or slug. - [Delete Workspace](https://docs.airmux.ai/api-reference/workspace-settings/delete-workspace.md): Delete a workspace, its memberships, inference keys, and provider credentials. - [List Policy Users](https://docs.airmux.ai/api-reference/workspace-policies/list-policy-users.md): Required permission: `policies.read`. - [List Policies](https://docs.airmux.ai/api-reference/workspace-policies/list-policies.md): List workspace inference policies. - [Create Policy](https://docs.airmux.ai/api-reference/workspace-policies/create-policy.md): Create a workspace inference policy. - [Update Policy](https://docs.airmux.ai/api-reference/workspace-policies/update-policy.md): Update a policy without changing its workspace. - [Delete Policy](https://docs.airmux.ai/api-reference/workspace-policies/delete-policy.md): Delete a workspace policy and publish the new configuration. - [Policy Status](https://docs.airmux.ai/api-reference/workspace-policies/policy-status.md): Required permissions: `policies.read` and `usage.read`. - [List Workspace Members](https://docs.airmux.ai/api-reference/workspace-members/list-workspace-members.md): List the members of a workspace and their workspace roles. - [List Workspace Member Candidates](https://docs.airmux.ai/api-reference/workspace-members/list-workspace-member-candidates.md): List organization members who can be added to a workspace. - [Add Workspace Member](https://docs.airmux.ai/api-reference/workspace-members/add-workspace-member.md): Add or update a workspace member who already belongs to the organization. - [Remove Workspace Member](https://docs.airmux.ai/api-reference/workspace-members/remove-workspace-member.md): Remove a member from a workspace without changing organization membership. - [List Workspace Management Keys](https://docs.airmux.ai/api-reference/workspace-management-keys/list-workspace-management-keys.md): List management keys scoped to one workspace. - [Create Workspace Management Key](https://docs.airmux.ai/api-reference/workspace-management-keys/create-workspace-management-key.md): Create a workspace-scoped management key and return its token once. - [Revoke Management Key](https://docs.airmux.ai/api-reference/instance-management-keys/revoke-management-key.md): Revoke an management key and every key delegated from it. - [Update Management Key Permissions](https://docs.airmux.ai/api-reference/instance-management-keys/update-management-key-permissions.md): Required permission: `management-keys.issue`. - [Prepare Playground Session](https://docs.airmux.ai/api-reference/workspace-playground/prepare-playground-session.md): Reuse the browser's short-lived playground session or rotate it into this workspace. - [End Playground Session](https://docs.airmux.ai/api-reference/workspace-playground/end-playground-session.md): Revoke the current browser playground session and clear its credential cookie. - [List Inference Key Owners](https://docs.airmux.ai/api-reference/workspace-inference-keys/list-inference-key-owners.md): List principals the caller may select as an inference-key owner. - [List Inference Keys](https://docs.airmux.ai/api-reference/workspace-inference-keys/list-inference-keys.md): List inference-key metadata for a workspace without returning secret tokens. - [Create Inference Key](https://docs.airmux.ai/api-reference/workspace-inference-keys/create-inference-key.md): Create an inference key for model requests to this workspace and return its token once. - [Revoke Inference Key](https://docs.airmux.ai/api-reference/workspace-inference-keys/revoke-inference-key.md): Revoke an inference key in a workspace. - [List Workspace Provider Credentials](https://docs.airmux.ai/api-reference/workspace-provider-credentials/list-workspace-provider-credentials.md): List provider credentials stored specifically for one workspace. - [Create Workspace Provider Credential](https://docs.airmux.ai/api-reference/workspace-provider-credentials/create-workspace-provider-credential.md): Store a provider API key for one workspace. - [Get Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/get-provider-credential.md): Return provider credential metadata without its secret value. - [Update Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/update-provider-credential.md): Update a provider credential's priority or enabled state. - [Delete Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/delete-provider-credential.md): Delete provider credential metadata and its stored secret value. - [Rotate Provider Credential](https://docs.airmux.ai/api-reference/organization-provider-credentials/rotate-provider-credential.md): Replace a provider credential's secret value. - [List Workspace Events](https://docs.airmux.ai/api-reference/workspace-usage-events/list-workspace-events.md): List usage events for one workspace with cursor pagination. - [Get Workspace Model Catalog](https://docs.airmux.ai/api-reference/workspace-model-catalog/get-workspace-model-catalog.md): Return the provider and model catalog available to a workspace. - [Get Authorized Bundle Manifest](https://docs.airmux.ai/api-reference/data-plane-api/get-authorized-bundle-manifest.md): Return every latest organization bundle visible to the authenticated data plane credential. - [Get Bundle](https://docs.airmux.ai/api-reference/data-plane-api/get-bundle.md): Return one immutable bundle visible to the authenticated data plane credential. - [Ingest Usage Events](https://docs.airmux.ai/api-reference/data-plane-api/ingest-usage-events.md): Ingest up to 1,000 usage events, skipping unauthorized or semantically invalid events. - [Record Data Plane Heartbeat](https://docs.airmux.ai/api-reference/data-plane-api/record-data-plane-heartbeat.md): Create or refresh a data-plane instance at the management key's scope. - [Sync Policy State](https://docs.airmux.ai/api-reference/data-plane-api/sync-policy-state.md): Required permission: `policy-state.sync`. ## OpenAPI Specs - [openapi](/lib/api-spec/openapi.yaml)