Skip to main content
Powabase resolves every model through LiteLLM, so the model string you pass anywhere — an agent, an orchestration, an indexing job — is a LiteLLM model ID. This guide covers the two things you need to get right: registering the provider key, and formatting the model string for that provider.
Prerequisites:
  • Authentication configured (see the Connect & authenticate guide)
  • An API key for the upstream provider you want to use (OpenAI, Anthropic, Google, or OpenRouter)

Model-string format

The prefix tells LiteLLM which provider to route to. Bare IDs route to first-party OpenAI/Anthropic; everything else is prefixed.
ProviderFormatExample
OpenAIbare IDgpt-4o, gpt-5.4-mini, o4-mini
Anthropicbare IDclaude-sonnet-4-6
Google (Gemini)gemini/<model>gemini/gemini-2.5-pro
OpenRouteropenrouter/<org>/<model>openrouter/qwen/qwen3-235b-a22b-2507
OpenRouter slugs must match LiteLLM’s cost-map keys, not OpenRouter’s own slugs. LiteLLM’s openrouter/... identifiers occasionally differ from the slugs shown on OpenRouter’s website or /api/v1/models. If a model errors with a routing or cost-lookup failure, the slug is the first thing to check — confirm it exists as a key in LiteLLM’s model cost map (search for openrouter/).
The model field on an agent is passed straight through to LiteLLM and is not restricted to the model picker shown in Studio. The curated dropdown only gates the Studio UI and the AGENT_DEFAULT_MODEL setting — via the API you can set any LiteLLM-resolvable model string. It must, however, support function calling if the agent has tools or a knowledge base; a non-tool model fails on its first tool call.

Which keys do you need?

Four providers accept a bring-your-own-key (BYOK) credential: openai, anthropic, google, openrouter. Register one with the AI Provider Keys API, then point your model string at it. If a provider is also AI-on-us on your pod (the platform has a server-side key for it), you can skip BYOK and pay in credits instead. Check which providers are covered:
cURL
curl '{BASE_URL}/api/ai-provider-keys/platform_supported' -H "apikey: {API_KEY}" -H "Authorization: Bearer {API_KEY}"
# {"providers": ["openai", "anthropic"]}
OpenRouter is rarely AI-on-us, so for OpenRouter models you almost always need your own key. Without a usable key, agent runs fail with 402 provider_key_decrypt_failed. See the billing model for how BYOK and credits interact.

Worked example: DeepSeek via OpenRouter

1

Register your OpenRouter key

requests.post(
    f"{BASE_URL}/api/ai-provider-keys",
    headers=headers,
    json={"provider": "openrouter", "api_key": "sk-or-..."},
)
The platform validates the key against the provider before storing it. A hard rejection (bad credential) returns 400 and stores nothing.
2

Create an agent pointed at the DeepSeek model

Use the openrouter/<org>/<model> format. DeepSeek’s OpenRouter org is deepseek:
agent = requests.post(
    f"{BASE_URL}/api/agents",
    headers=headers,
    json={
        "name": "DeepSeek Agent",
        "model": "openrouter/deepseek/deepseek-chat",
        "system_prompt": "You are a helpful assistant.",
    },
).json()
openrouter/deepseek/deepseek-chat follows the documented format, but confirm the exact slug against LiteLLM’s cost map (see the warning above) — DeepSeek publishes several models (e.g. chat vs. reasoner), and the LiteLLM key is what the platform routes on. If you give the agent tools, pick a DeepSeek model that supports function calling.
3

Run it

Run the agent as usual — the platform decrypts your OpenRouter key at call time and routes the request through LiteLLM.
cURL
curl -X POST '{BASE_URL}/api/agents/{agent_id}/run' \
  -H "apikey: {API_KEY}" \
  -H "Authorization: Bearer {API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello!"}'
If you see 402 provider_key_decrypt_failed, the OpenRouter key is missing or unreadable — re-register it in step 1.

AI provider keys reference

Store, validate, rotate, and inspect per-project provider credentials.

Build an agent

Create an agent, assign tools and a knowledge base, then stream a conversation.

Billing model

How AI-on-us credits and BYOK keys interact, and the 402/503 error shapes.

Settings reference

Defaults like AGENT_DEFAULT_MODEL and the curated model choices.