Use the REST API when you want to script Phoenix workflows: creating datasets, running experiments, querying spans, or managing prompts and projects. Use the API Reference page for the full endpoint list.
Browse every endpoint grouped by resource.
Before You Call The API#
Choose your base URL
- A remote deployment:
https://your-phoenix.example.com - Self-hosted Phoenix: your deployment URL (for example
http://localhost:6006)
Set authentication (if enabled)
Use an API key or admin secret in a bearer token header:
Authorization: Bearer <your-token>
Call a v1 endpoint
All REST endpoints are under /v1/....
If authentication is disabled in your self-hosted deployment, you can omit the Authorization header.
First Request#
The example below lists projects and includes common pagination query params.
Response Pattern#
Most list endpoints return a shape like:
When next_cursor is not null, pass it back as the cursor query param to fetch the next page.
Chat Completions Proxy#
POST /v1/chat/completions accepts the OpenAI wire format and proxies the call to the provider you name, resolving provider credentials on the server (secret store first, environment second) so callers never handle provider API keys.
Phoenix is not an AI gateway. The same server also takes on trace ingestion traffic, so routing production LLM calls through it competes with ingestion. Use this endpoint only to quickly try out different models in non-production environments.
Set model to {provider}:{model_name} for a built-in provider, or custom:{provider_id}:{model_name} for a custom provider you have stored. Pass stream: true for server-sent chat.completion.chunk events terminated by data: [DONE]. Tool calling is not supported.

