Provider keys
List the caller's organization's provider keys. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Include archived keys.
falseNumber of records to skip
0Maximum number of records to return
100Successful Response
Validation Error
GET /api/v1/organizations/me/provider-keys HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"count": 1,
"data": [
{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}
]
}Create a provider key in the caller's organization. Organization owners and admins only.
Everything the provider lists on the new credential is offered at once, so a key starts with its real catalog rather than an empty list an admin retypes by hand. A provider that will not say (no listing endpoint, unreachable, credential refused) yields a key with no models rather than a failed create: the credential may still be right for dispatch, and models can be added by name. The response is the key either way; the models are read back through GET /{key_id}/models.
Enter your API key here (sent as Otari-Key header).
What a caller sends to create a key.
The plaintext key is never stored as sent: the service encrypts it
(services/secret_box.py) and keeps only the ciphertext and last4,
the same convention providers.ProviderCredential already uses.
The name requests reach a key with a custom base URL by, as in <slug>:<model>. Only such a key has one, and once set it never changes. Left out, it is made from the key's name.
The organization's declaration that the provider account behind this key keeps no prompt or completion data. The catalog shows it and filters on it; nothing is enforced on it.
falseSuccessful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 163
{
"api_base": "text",
"api_key": "text",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"name": "text",
"provider": "text",
"slug": "text",
"zero_data_retention": false
}{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}Change a key's name, credential, base URL, or client args. Organization owners and admins only.
A new base URL on a key that holds a credential needs that credential in the same request, api_key and any masked client_args entry, since the next call sends it to the new host. Clearing the base URL needs neither.
Enter your API key here (sent as Otari-Key header).
A partial update. Every field is optional; only what is set is applied.
Successful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
PATCH /api/v1/organizations/me/provider-keys/{key_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 130
{
"api_base": "text",
"api_key": "text",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"name": "text",
"zero_data_retention": true
}{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}Permanently delete an archived key. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
DELETE /api/v1/organizations/me/provider-keys/{key_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"message": "text"
}Archive a key. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/archive HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}Ask the provider what it serves on this key's stored credential.
Dials the upstream on every call rather than caching: the caller is a model picker, opened rarely and entitled to a current answer. The credential never leaves the process; only model names come back. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
What the provider says it serves on this key's stored credential.
Failure is a field rather than a status: an unreachable upstream, or a provider with no model listing, is an answer about the provider rather than about this request, and the form still has to render (with a plain text box) when the list cannot be fetched.
falseValidation Error
GET /api/v1/organizations/me/provider-keys/{key_id}/available-models HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"discovery_unsupported": false,
"error": "text",
"models": [
"text"
],
"provider": "text"
}Make a key the organization's default for its provider. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/default HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}Stop a key being the organization's default for its provider. Organization owners and admins only.
Idempotent: a key that is not the default is returned unchanged. With no default, a request that names no instance gets the provider's earliest-created key the workspace has not disabled.
Enter your API key here (sent as Otari-Key header).
Successful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
DELETE /api/v1/organizations/me/provider-keys/{key_id}/default HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}List the models offered on one key, each with the rate it currently serves at.
Organization owners and admins only. count is the total rather than the page length, so a client knows whether another page is owed.
Enter your API key here (sent as Otari-Key header).
Number of records to skip
0Maximum number of records to return
500Only models of this kind; unknown for those no source names a kind for
Successful Response
One page of a key's offered models, and how many there are in total.
count is the total of the kind asked for, and type_counts how many
of each kind the key offers, unknown for a model of no known kind.
Validation Error
GET /api/v1/organizations/me/provider-keys/{key_id}/models HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"count": 1,
"data": [
{
"cache_read_price_per_million": 1,
"cache_write_price_per_million": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"enabled": true,
"id": "123e4567-e89b-12d3-a456-426614174000",
"input_price_per_million": 1,
"model": "text",
"org_provider_key_id": "123e4567-e89b-12d3-a456-426614174000",
"output_price_per_million": 1,
"price_source": "organization",
"pricing_id": "123e4567-e89b-12d3-a456-426614174000",
"type": "chat",
"unit": "token",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"type_counts": {
"ANY_ADDITIONAL_PROPERTY": 1
}
}Offer one model by name, for a backend whose models cannot be listed.
Carries no rate: an organization's rates are written through /api/v1/organizations/me/pricing, so a price set here and a price set there could not disagree about what a request costs. The offer seeds the community default like any other, and a model nothing prices arrives disabled. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Offer one model on a key, for a backend whose models cannot be listed.
Successful Response
One offered model, with the rate the caller's organization is charged for it.
price_source says which rung of services.pricing_service answered:
organization for a rate an admin set, defaults for the
community-maintained rate this surface seeded or the models.dev fallback,
deployment for the deployment's own price list, and None when nothing
prices the model yet. pricing_id names the organization's own row where
there is one, so a client can edit that rate without re-deriving the key.
unit says what the rates are per, as on a pricing row: token, request
or image, so a per-request rate is not read as a per-token one. type
is the kind of model, from models.dev, and None when it does not know.
tokenPossible values: Validation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/models HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"model": "text"
}{
"cache_read_price_per_million": 1,
"cache_write_price_per_million": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"enabled": true,
"id": "123e4567-e89b-12d3-a456-426614174000",
"input_price_per_million": 1,
"model": "text",
"org_provider_key_id": "123e4567-e89b-12d3-a456-426614174000",
"output_price_per_million": 1,
"price_source": "organization",
"pricing_id": "123e4567-e89b-12d3-a456-426614174000",
"type": "chat",
"unit": "token",
"updated_at": "2026-01-01T00:00:00.000Z"
}Ask the provider again and offer whatever is newly listed.
Additive only: nothing already offered is removed or switched off, because delisting a model is a decision the serving switch owns and an upstream hiccup must not empty a catalog. New models follow the offer rule, seeded with the community default rate and disabled when nothing prices them. A rate this surface seeded and nobody has changed moves to today's default. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
What a refresh did: what it newly offered, what it repriced, and the list's new size.
Failure is a field rather than a status, for the reason
OrgProviderAvailableModelsPublic gives: the list is still standing, and
the panel renders the reason beside it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/models/refresh HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"added": [
"text"
],
"count": 1,
"discovery_unsupported": false,
"error": "text",
"repriced": [
"text"
]
}Turn one offered model's serving switch on or off. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Whether the runtime serves this model. The only field an update may change.
A rate is not here: an organization's rates live in
organization_model_pricing and are written through
/organizations/me/pricing, so a price set on this surface and a price set
on that one could not disagree.
Successful Response
One offered model, with the rate the caller's organization is charged for it.
price_source says which rung of services.pricing_service answered:
organization for a rate an admin set, defaults for the
community-maintained rate this surface seeded or the models.dev fallback,
deployment for the deployment's own price list, and None when nothing
prices the model yet. pricing_id names the organization's own row where
there is one, so a client can edit that rate without re-deriving the key.
unit says what the rates are per, as on a pricing row: token, request
or image, so a per-request rate is not read as a per-token one. type
is the kind of model, from models.dev, and None when it does not know.
tokenPossible values: Validation Error
PATCH /api/v1/organizations/me/provider-keys/{key_id}/models/{model_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"enabled": true
}{
"cache_read_price_per_million": 1,
"cache_write_price_per_million": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"enabled": true,
"id": "123e4567-e89b-12d3-a456-426614174000",
"input_price_per_million": 1,
"model": "text",
"org_provider_key_id": "123e4567-e89b-12d3-a456-426614174000",
"output_price_per_million": 1,
"price_source": "organization",
"pricing_id": "123e4567-e89b-12d3-a456-426614174000",
"type": "chat",
"unit": "token",
"updated_at": "2026-01-01T00:00:00.000Z"
}Stop offering one model. Its rate and its history stay. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
DELETE /api/v1/organizations/me/provider-keys/{key_id}/models/{model_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"message": "text"
}Move every rate this surface seeded onto today's community default.
The other half of the refresh above, without the dial: re-reading community rates is cheap and asking a provider for its whole catalog is not, so an admin who only wants the price move does not wait on an upstream. A rate an admin has since set is left alone, and a model that arrived unpriced is offered a rate and switched on if one has appeared. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
What a refresh did: what it newly offered, what it repriced, and the list's new size.
Failure is a field rather than a status, for the reason
OrgProviderAvailableModelsPublic gives: the list is still standing, and
the panel renders the reason beside it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/pricing/refresh HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"added": [
"text"
],
"count": 1,
"discovery_unsupported": false,
"error": "text",
"repriced": [
"text"
]
}Restore an archived key. Organization owners and admins only.
Enter your API key here (sent as Otari-Key header).
Successful Response
The API-facing shape. Never carries the key, only whether one is set.
How many models the organization offers on this key. Zero means the key has never been refreshed, so it is unnarrowed and reaches whatever its provider serves.
How many of the offered models have their serving switch on. A key offering models and serving none refuses every request through it until one is switched on.
What requests name this key by, as in <slug>:<model>, for a key with a custom base URL. Absent for a key reached as <provider>:<model>.
False when the stored credential cannot be decrypted on this deployment, so the key supplies nothing at dispatch and the catalog withholds its provider. A row this deployment cannot read is still listed, because deleting or replacing it is what fixes it.
falseValidation Error
POST /api/v1/organizations/me/provider-keys/{key_id}/restore HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"api_base": "text",
"archived_at": "2026-01-01T00:00:00.000Z",
"client_args": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-01-01T00:00:00.000Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_org_default": true,
"last4": "text",
"name": "text",
"offered_count": 1,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "text",
"serving_count": 1,
"slug": "text",
"updated_at": "2026-01-01T00:00:00.000Z",
"usable": true,
"zero_data_retention": false
}The effective view of every key visible to this workspace. Any member of the workspace may read it.
Enter your API key here (sent as Otari-Key header).
Successful Response
Validation Error
GET /api/v1/workspaces/{workspace_id}/provider-keys HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"allowed_models": [
"text"
],
"disabled": true,
"is_default": true,
"is_effective_default": true,
"is_effective_enabled": true,
"org_provider_key_id": "123e4567-e89b-12d3-a456-426614174000",
"usable": true,
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"zero_data_retention": false
}
]
}Pin or disable a key for this workspace. Organization owners/admins or this workspace's owners/admins.
Enter your API key here (sent as Otari-Key header).
Tri-state: an omitted field leaves that flag unchanged.
Both fields false, whether that is the merged result or a value sent explicitly, is a no-op the service deletes rather than stores: absence of a row already means full inheritance from the organization default. Setting one true auto-resolves the other when they would otherwise conflict (pinning re-enables a disabled key; disabling un-pins a pinned one); sending both true explicitly is refused.
Successful Response
The effective view for one workspace+key: raw override flags plus the resolution.
falseValidation Error
PATCH /api/v1/workspaces/{workspace_id}/provider-keys/{key_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"disabled": true,
"is_default": true
}{
"allowed_models": [
"text"
],
"disabled": true,
"is_default": true,
"is_effective_default": true,
"is_effective_enabled": true,
"org_provider_key_id": "123e4567-e89b-12d3-a456-426614174000",
"usable": true,
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"zero_data_retention": false
}Remove this workspace's override, reverting to full inheritance. Idempotent.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
DELETE /api/v1/workspaces/{workspace_id}/provider-keys/{key_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"message": "text"
}List this workspace's model allow-list for a key. Empty means every model is allowed.
Enter your API key here (sent as Otari-Key header).
Successful Response
Validation Error
GET /api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"models": [
"text"
]
}Narrow this workspace's allow-list for a key to include one more model. Idempotent.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
POST /api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"model": "text"
}{
"message": "text"
}Remove one model from this workspace's allow-list for a key. Idempotent.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
DELETE /api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models/{model} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"message": "text"
}Last updated
Was this helpful?
