API Key and Base URL: Add a Custom AI Provider

API Key and Base URL configuration connects a model entry to your chosen provider. Set the protocol and model ID, then verify a request in the feature using it.

Updated

PandaNpc stores provider connections and model entries that you configure. Start with the API Key, Base URL, protocol and model ID supplied by your service. Adding an entry does not create an upstream account or grant model access.

For the distinction between a provider and a model, read Manage your custom model list.

Before you start

Confirm the following with your provider or self-hosted service:

  • The API base address, not the provider's website address.
  • The authentication method and any required credentials.
  • The API protocol supported by the feature or engine you intend to use.
  • The exact model ID your account can call.
  • Context and output limits if you plan to enter them manually.

Keep credentials in the provider form, not in prompts, screenshots or shared notes. A service advertised as OpenAI compatible may still differ in streaming, tool calls or image support.

1. Add or configure a provider

Open Model Configuration. Add a provider, configure an existing preset, or copy a preset when you need an independently editable connection.

Field What to enter
Display Name A recognizable name for this connection
Provider ID An identifier for the provider configuration
API Key The credential required by your service
Base URL The API base address expected by the chosen integration
Protocol The format the upstream API actually implements
Secret, Organization, Project Only values explicitly required by your service
Support content array Whether the service accepts structured message content

The Base URL shape depends on the protocol and the feature making requests. Do not append a complete operation path if the integration already appends it. For example, an integration that adds /chat/completions needs the corresponding base address, not an address already ending with that path. Do not apply that example to every protocol.

When editing stored credentials, leaving the API Key or Secret blank preserves the configured value. A masked value shown in a list is not the original key and should not be pasted back as a replacement.

2. Add the model

Save the provider, select it and choose Add Model.

Field Meaning
Display Name Your label in the model list
Model Value The exact upstream model ID
Model Type The applicable category in the configuration form
Provider The connection this entry uses
Context Window The documented context capacity, when specified
Max Tokens The output limit, when specified

Use an ID from the service's documentation or model list. A marketing name is not necessarily an API identifier. Leave optional limits unset if you cannot verify them; unset does not mean the real limits have been detected. The consuming feature may apply its own defaults.

3. Verify the configuration

In the feature or engine that uses these settings:

  1. Select the new entry and start a test conversation.
  2. Send a short request such as Reply with: connected.
  3. Confirm a normal response and, where available, a matching request in the provider's usage records.
  4. Send a follow-up to check continuous conversation.
  5. Test images or tool calls separately if your work requires them.

Saving the record is not a connection test. A text response does not establish compatibility with every capability. Changing a model entry also does not automatically reconfigure an existing Claude Code or Codex process; see PandaPaw.

Troubleshooting

Authentication fails

Check whether the key is active, the account can access the model, and the service requires additional authentication fields. Replace expired credentials through the provider form.

The endpoint or model is not found

Check both the Base URL and Model Value. Look for duplicate operation paths, a missing API prefix, or a model ID unavailable to your account. The same error can have different causes across providers.

A network or browser error appears

Check connectivity from the device actually sending the request. Browser-originated requests are subject to CORS and HTTPS restrictions; a working request from another computer does not prove the browser path works.

A local model server cannot be reached

localhost refers to the machine making the request. It does not automatically point to your remote PandaPaw computer. Confirm where the consuming feature runs before choosing the address of your local server.

Text works but images, tools or long sessions fail

Check the exact combination of engine, API protocol and model capabilities. Use provider-supported limits and verify each required input type. Increasing Context Window or changing Model Type does not add upstream capabilities.

For the distinction between platform membership and provider usage, see accounts and model costs.