Skip to main content
Nearly every Onyx feature is accessible through the Onyx API. Onyx APIs are built on REST principles with JSON request/response formats. All endpoints require authentication and follow relatively consistent patterns. Make API requests to: https://cloud.onyx.app/api or https://your-self-hosted-onyx.com/api
Onyx follows SemVer 2.0.0. Breaking changes will be indicated by major version increments.

Authentication

To authenticate your requests, generate an API key from the Onyx Admin Console. There are three types of API keys:
Can access all endpoints, including those pre-fixed with admin/.Use cases:
  • Full system administration
  • User management operations
  • Data management and analytics
  • Complete access to all Onyx features
⚠️ Use with caution: Admin keys have unrestricted access to your Onyx instance.
Can access the non-admin endpoints like Search, Chat, Agents, and Actions.Use cases:
  • Building chat applications
  • Implementing search functionality
  • Creating and managing agents
  • Running actions and workflows
✅ Recommended: Most users should use Basic API Keys for application development.
Read-only Agent access. Can post messages to Chat endpoints, but cannot read chat history.Use cases:
  • Highly restricted environments
  • Specific use cases requiring minimal permissions
  • Testing with limited scope
Coming soon: User-Scoped Token tied to a specific user’s permissions and data access.
API Keys exist as distinct users in Onyx. This means:
  • You can trace activity to a specific API Key
  • Chat sessions generated by API will be private and reusable with that API Key
  • Agents, Connectors, and Document Sets can be configured to be private to that API Key

API Reference and Playground

In the API Reference, we have curated a subset of useful Onyx API endpoints. You can experiment with the endpoints on each page or follow one of our Guides. You can find all Onyx API endpoints in the built-in OpenAPI explorer: https://cloud.onyx.app/api/docs or https://your-onyx-domain.com/api/docs
The explorer is purely for reference. It is not a fully-featured API client. Ignore the tenant_id parameter and use your API key as a Bearer token.

Next Steps

I