Skip to main content
Configure the credentials and endpoints that Phoenix uses to call AI providers from the Prompt Playground and from prompts. Phoenix has native integrations for OpenAI, Azure OpenAI, Anthropic, and Google AI Studio (Gemini). Many other providers, for example DeepSeek and Ollama, work with the OpenAI client. Thus you can also use any OpenAI-compatible LLM provider.

Credentials

Select one of four options to supply your API keys:
  1. Browser: Store the keys in the local storage of your browser.
  2. Database (Secrets): Save the keys encrypted in the Phoenix database.
  3. Database (Custom Providers): Configure named providers with specific credentials.
  4. Environment Variables: Set the keys as environment variables on the server.
For built-in providers (for example, when you select “OpenAI” directly), Phoenix uses the first credential that it finds in this order: Browser > Database (Secrets) > Environment Variables. You select Custom Providers (option 3) explicitly. They use their own configured credentials.

Option 1: Store API Keys in the Browser

  1. In the playground, open the API Keys menu.
  2. Enter your API keys.
Phoenix stores these keys in the local storage of your browser.
Phoenix AI provider settings with environment variable names and configuration status

Option 2: Save Secrets (Encrypted) in the Database

If you change the PHOENIX_SECRET environment variable on the server, Phoenix cannot read the saved keys. You must then enter the keys again.
  1. Go to the Settings page.
  2. Select the AI Providers tab.
  3. Click the edit icon for a provider.
  4. In the dialog, set the view to Secrets.
  5. Enter your keys.
Phoenix stores the keys encrypted at rest in the secrets table.

Option 3: Custom Providers

A custom provider stores provider credentials and routing settings on the server. You can use it again in the playground and in prompt versions. To configure custom providers, see Custom AI Providers. Using Custom Providers in the Playground and Prompts Custom providers show in model selection menus as their own provider group. When you select one:
  1. The model list is the same as the built-in model list for that SDK.
  2. Phoenix gets the routing fields (base URL, Azure endpoint, AWS region) from the custom provider configuration.
  3. You can add request-level custom headers from the model configuration panel.
Prompt versions and evaluators use a custom provider when you save the prompt version with a custom provider selected. If you do not select a custom provider for a prompt, Phoenix uses the environment variables or saved secrets for the built-in provider.

Option 4: Set Environment Variables on Server Side

Set these variables in the server environment. Phoenix uses them when it invokes the API. The OpenAI-compatible built-in providers (OpenAI, DeepSeek, xAI, Ollama, Cerebras, Fireworks, Groq, Moonshot, MiniMax, Perplexity, Together, Z.ai, and Meta) also read a <PROVIDER>_BASE_URL variable, for example DEEPSEEK_BASE_URL or META_BASE_URL. Use it to send requests to a different endpoint, for example a proxy or a regional API. Ollama has no default endpoint, so this variable is required for Ollama.
For Azure, you can also set these server-side environment variables to use WorkloadIdentityCredential: AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_FEDERATED_TOKEN_FILE.
AWS Bedrock AuthenticationFor AWS Bedrock, Phoenix uses the standard boto3 credential chain or the AWS_BEARER_TOKEN_BEDROCK environment variable. Thus you do not need to supply credentials explicitly in these conditions:
  • Phoenix runs on an EC2 instance with an assigned IAM role.
  • You configured ~/.aws/credentials.
  • You exported AWS_BEARER_TOKEN_BEDROCK.
To use this fallback, do not fill in the AWS credentials in the Playground settings. The client then finds and uses the credentials from the environment.

Using OpenAI Compatible LLMs

Option 1: Configure the base URL in the prompt playground

You can set the base URL of the OpenAI client. Thus you can use the prompt playground with OpenAI-client-compatible LLMs such as Ollama and DeepSeek.
If you use a different LLM provider, set the OpenAI API key to the API key of that provider.
In the prompt playground, enter the base URL of the OpenAI-client-compatible LLM provider.
Phoenix prompt playground with model configuration controls

Simply insert the URL for the OpenAI client compatible LLM provider

OpenAI-client-compatible providers: The built-in MiniMax provider uses the global endpoint by default. To use the China endpoint, set MINIMAX_BASE_URL=https://api.minimaxi.com/v1.

Using the MiniMax Anthropic-compatible API

  1. Open Settings and select AI Providers.
  2. Create a custom provider with the Anthropic SDK and your MiniMax API key.
  3. Set the base URL for the region that you need. See the table below.
  4. In the model menu, enter MiniMax-M3 or MiniMax-M2.7.
Use the base URL exactly as shown. The Anthropic SDK adds /v1/messages when Phoenix sends a request.

Option 2: Server side configuration of the OpenAI base URL

If your Phoenix instance uses HTTPS, this option can fail because of mixed-content restrictions. In that case, a Connection Error shows.If you want to use a specific LLM endpoint, contact mailto://phoenix-support@arize.com
Set the OPENAI_BASE_URL environment variable on the server to send requests to any OpenAI-compatible REST API.
OpenAI and Azure OpenAI support two API types: Chat Completions (chat.completions.create) and Responses (responses.create). Built-in and custom providers use the Responses API by default. For built-in providers, change the API type for each model in the model configuration panel of the Playground. For custom providers, set the API type in the provider configuration.

Custom Headers

Add custom HTTP headers to the requests that Phoenix sends to AI providers. Use them for routing or cost tracking with custom LLM proxies.

Configuring Custom Headers

  1. Click the model configuration button in the playground.
  2. Scroll down to the “Custom Headers” section.
  3. Add your headers in JSON format:

Set a Default Provider and Model

Set the provider and model that the Prompt Playground selects by default.
  1. Go to Settings → AI Providers.
  2. In the AI Provider Settings card, select a default provider and model.
Phoenix saves this preference in your browser. It applies the preference the first time the playground opens in a session. This setting is different from the “save as default” control in the model configuration panel of the playground: