Providers
Overview
Providers store Tenant model credentials and optional custom endpoints. Use these endpoints to configure a model backend or test credentials before assigning it to an Agent.
Endpoints
POST /v1/providers
Stores one model Provider and its encrypted API key. Provider names are unique per tenant; a tenant can have at most 20.
Request
Requires bearer authentication and JSON. There are no path or query parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Body field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Display name, 1–80 characters |
providerType | string | yes | openai, anthropic, openrouter, google, or custom |
baseUrl | string | null | no | Provider base URL; required and non-empty for custom |
apiKey | string | yes | Write-only Provider API key |
Response
Returns 201 Created. The key is never returned; keyFragment contains up to its last four characters.
Response schema: providerResponseSchema.
{
"id": "prv_1234567890ABCDEF",
"name": "Production OpenRouter",
"providerType": "openrouter",
"baseUrl": null,
"keyFragment": "wxyz",
"createdAt": "2026-07-10T10:00:00Z",
"updatedAt": "2026-07-10T10:00:00Z"
}Errors
400 invalid_request for invalid input, duplicate names, a missing custom baseUrl, or the 20-Provider cap. See REST errors.
cURL
curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/providers" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"name":"Production OpenRouter","providerType":"openrouter","baseUrl":null,"apiKey":"'"$PROVIDER_API_KEY"'"}'SDK and related guides
SDK: create. See Models and Providers and Bring your own Provider.
GET /v1/providers
Returns all Providers for the tenant. The list is bounded to 20 and is not paginated. Stored API keys are never returned.
Request
Requires bearer authentication. There are no path, query, or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
Response
Returns 200 OK.
Response schema: providersResponseSchema.
{
"providers": [
{
"id": "prv_1234567890ABCDEF",
"name": "Production OpenRouter",
"providerType": "openrouter"