> For the complete documentation index, see [llms.txt](https://docs.otari.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otari.ai/otari/for-integrators/api-reference/provider-keys.md).

# Provider keys

## List Org Provider Keys

> List the caller's organization's provider keys. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeysPublic":{"properties":{"count":{"title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/OrgProviderKeyPublic"},"title":"Data","type":"array"}},"required":["data","count"],"title":"OrgProviderKeysPublic","type":"object"},"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys":{"get":{"description":"List the caller's organization's provider keys. Organization owners and admins only.","operationId":"provider-keys-list_org_provider_keys","parameters":[{"description":"Include archived keys.","in":"query","name":"include_archived","required":false,"schema":{"default":false,"description":"Include archived keys.","title":"Include Archived","type":"boolean"}},{"description":"Number of records to skip","in":"query","name":"skip","required":false,"schema":{"default":0,"description":"Number of records to skip","minimum":0,"title":"Skip","type":"integer"}},{"description":"Maximum number of records to return","in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Maximum number of records to return","maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeysPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Org Provider Keys","tags":["provider-keys"]}}}}
```

## Create Org Provider Key

> 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\`\`.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyCreateRequest":{"description":"What a caller sends to create a key.\n\nThe plaintext key is never stored as sent: the service encrypts it\n(`services/secret_box.py`) and keeps only the ciphertext and ``last4``,\nthe same convention `providers.ProviderCredential` already uses.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"name":{"maxLength":255,"title":"Name","type":"string"},"provider":{"maxLength":255,"title":"Provider","type":"string"}},"required":["provider","name"],"title":"OrgProviderKeyCreateRequest","type":"object"},"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys":{"post":{"description":"Create a provider key in the caller's organization. Organization owners and admins only.\n\nEverything the provider lists on the new credential is offered at once, so a\nkey starts with its real catalog rather than an empty list an admin retypes\nby hand. A provider that will not say (no listing endpoint, unreachable,\ncredential refused) yields a key with no models rather than a failed create:\nthe credential may still be right for dispatch, and models can be added by\nname. The response is the key either way; the models are read back through\n``GET /{key_id}/models``.","operationId":"provider-keys-create_org_provider_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Create Org Provider Key","tags":["provider-keys"]}}}}
```

## Update Org Provider Key

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyUpdateRequest":{"description":"A partial update. Every field is optional; only what is set is applied.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"title":"Name"}},"title":"OrgProviderKeyUpdateRequest","type":"object"},"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}":{"patch":{"description":"Change a key's name, credential, base URL, or client args. Organization owners and admins only.\n\nA new base URL on a key that holds a credential needs that credential in the\nsame request, `api_key` and any masked `client_args` entry, since the next call\nsends it to the new host. Clearing the base URL needs neither.","operationId":"provider-keys-update_org_provider_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Update Org Provider Key","tags":["provider-keys"]}}}}
```

## Delete Org Provider Key

> Permanently delete an archived key. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"Message":{"description":"A human-readable acknowledgment for an operation with nothing to return.","properties":{"message":{"description":"What happened.","title":"Message","type":"string"}},"required":["message"],"title":"Message","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}":{"delete":{"description":"Permanently delete an archived key. Organization owners and admins only.","operationId":"provider-keys-delete_org_provider_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Org Provider Key","tags":["provider-keys"]}}}}
```

## Archive Org Provider Key

> Archive a key. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/archive":{"post":{"description":"Archive a key. Organization owners and admins only.","operationId":"provider-keys-archive_org_provider_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Archive Org Provider Key","tags":["provider-keys"]}}}}
```

## List Org Provider Key Available Models

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderAvailableModelsPublic":{"description":"What the provider says it serves on this key's stored credential.\n\nFailure is a field rather than a status: an unreachable upstream, or a\nprovider with no model listing, is an answer about the provider rather than\nabout this request, and the form still has to render (with a plain text box)\nwhen the list cannot be fetched.","properties":{"discovery_unsupported":{"default":false,"title":"Discovery Unsupported","type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"models":{"items":{"type":"string"},"title":"Models","type":"array"},"provider":{"title":"Provider","type":"string"}},"required":["provider"],"title":"OrgProviderAvailableModelsPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/available-models":{"get":{"description":"Ask the provider what it serves on this key's stored credential.\n\nDials the upstream on every call rather than caching: the caller is a model\npicker, opened rarely and entitled to a current answer. The credential never\nleaves the process; only model names come back. Organization owners and\nadmins only.","operationId":"provider-keys-list_org_provider_key_available_models","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderAvailableModelsPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Org Provider Key Available Models","tags":["provider-keys"]}}}}
```

## Set Org Provider Key Default

> Make a key the organization's default for its provider. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/default":{"post":{"description":"Make a key the organization's default for its provider. Organization owners and admins only.","operationId":"provider-keys-set_org_provider_key_default","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Org Provider Key Default","tags":["provider-keys"]}}}}
```

## Unset Org Provider Key Default

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/default":{"delete":{"description":"Stop a key being the organization's default for its provider. Organization owners and admins only.\n\nIdempotent: a key that is not the default is returned unchanged. With no default, a request\nthat names no instance gets the provider's earliest-created key the workspace has not disabled.","operationId":"provider-keys-unset_org_provider_key_default","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Unset Org Provider Key Default","tags":["provider-keys"]}}}}
```

## List Org Provider Key Models

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyModelsPublic":{"description":"One page of a key's offered models, and how many there are in total.","properties":{"count":{"title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/OrgProviderKeyModelPublic"},"title":"Data","type":"array"}},"required":["data","count"],"title":"OrgProviderKeyModelsPublic","type":"object"},"OrgProviderKeyModelPublic":{"description":"One offered model, with the rate the caller's organization is charged for it.\n\n``price_source`` says which rung of ``services.pricing_service`` answered:\n``organization`` for a rate an admin set, ``defaults`` for the\ncommunity-maintained rate this surface seeded or the models.dev fallback,\n``deployment`` for the deployment's own price list, and None when nothing\nprices the model yet. ``pricing_id`` names the organization's own row where\nthere is one, so a client can edit that rate without re-deriving the key.\n``unit`` says what the rates are per, as on a pricing row: tokens, requests\nor images, so a per-request rate is not read as a per-token one.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"model":{"title":"Model","type":"string"},"org_provider_key_id":{"format":"uuid","title":"Org Provider Key Id","type":"string"},"output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Price Per Million"},"price_source":{"anyOf":[{"enum":["organization","deployment","defaults"],"type":"string"},{"type":"null"}],"title":"Price Source"},"pricing_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Pricing Id"},"unit":{"default":"tokens","title":"Unit","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","org_provider_key_id","model","enabled","created_at"],"title":"OrgProviderKeyModelPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/models":{"get":{"description":"List the models offered on one key, each with the rate it currently serves at.\n\nOrganization owners and admins only. ``count`` is the total rather than the\npage length, so a client knows whether another page is owed.","operationId":"provider-keys-list_org_provider_key_models","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}},{"description":"Number of records to skip","in":"query","name":"skip","required":false,"schema":{"default":0,"description":"Number of records to skip","minimum":0,"title":"Skip","type":"integer"}},{"description":"Maximum number of records to return","in":"query","name":"limit","required":false,"schema":{"default":500,"description":"Maximum number of records to return","maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyModelsPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Org Provider Key Models","tags":["provider-keys"]}}}}
```

## Add Org Provider Key Model

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyModelCreateRequest":{"description":"Offer one model on a key, for a backend whose models cannot be listed.","properties":{"model":{"maxLength":255,"title":"Model","type":"string"}},"required":["model"],"title":"OrgProviderKeyModelCreateRequest","type":"object"},"OrgProviderKeyModelPublic":{"description":"One offered model, with the rate the caller's organization is charged for it.\n\n``price_source`` says which rung of ``services.pricing_service`` answered:\n``organization`` for a rate an admin set, ``defaults`` for the\ncommunity-maintained rate this surface seeded or the models.dev fallback,\n``deployment`` for the deployment's own price list, and None when nothing\nprices the model yet. ``pricing_id`` names the organization's own row where\nthere is one, so a client can edit that rate without re-deriving the key.\n``unit`` says what the rates are per, as on a pricing row: tokens, requests\nor images, so a per-request rate is not read as a per-token one.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"model":{"title":"Model","type":"string"},"org_provider_key_id":{"format":"uuid","title":"Org Provider Key Id","type":"string"},"output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Price Per Million"},"price_source":{"anyOf":[{"enum":["organization","deployment","defaults"],"type":"string"},{"type":"null"}],"title":"Price Source"},"pricing_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Pricing Id"},"unit":{"default":"tokens","title":"Unit","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","org_provider_key_id","model","enabled","created_at"],"title":"OrgProviderKeyModelPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/models":{"post":{"description":"Offer one model by name, for a backend whose models cannot be listed.\n\nCarries no rate: an organization's rates are written through\n``/api/v1/organizations/me/pricing``, so a price set here and a price set\nthere could not disagree about what a request costs. The offer seeds the\ncommunity default like any other, and a model nothing prices arrives\ndisabled. Organization owners and admins only.","operationId":"provider-keys-add_org_provider_key_model","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyModelCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyModelPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Add Org Provider Key Model","tags":["provider-keys"]}}}}
```

## Refresh Org Provider Key Models

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderModelsRefreshPublic":{"description":"What a refresh did: what it newly offered, what it repriced, and the list's new size.\n\nFailure is a field rather than a status, for the reason\n``OrgProviderAvailableModelsPublic`` gives: the list is still standing, and\nthe panel renders the reason beside it.","properties":{"added":{"items":{"type":"string"},"title":"Added","type":"array"},"count":{"title":"Count","type":"integer"},"discovery_unsupported":{"default":false,"title":"Discovery Unsupported","type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"repriced":{"items":{"type":"string"},"title":"Repriced","type":"array"}},"required":["added","repriced","count"],"title":"OrgProviderModelsRefreshPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/models/refresh":{"post":{"description":"Ask the provider again and offer whatever is newly listed.\n\nAdditive only: nothing already offered is removed or switched off, because\ndelisting a model is a decision the serving switch owns and an upstream\nhiccup must not empty a catalog. New models follow the offer rule, seeded\nwith the community default rate and disabled when nothing prices them. A\nrate this surface seeded and nobody has changed moves to today's default.\nOrganization owners and admins only.","operationId":"provider-keys-refresh_org_provider_key_models","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderModelsRefreshPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Refresh Org Provider Key Models","tags":["provider-keys"]}}}}
```

## Set Org Provider Key Model Enabled

> Turn one offered model's serving switch on or off. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyModelUpdateRequest":{"description":"Whether the runtime serves this model. The only field an update may change.\n\nA rate is not here: an organization's rates live in\n``organization_model_pricing`` and are written through\n``/organizations/me/pricing``, so a price set on this surface and a price set\non that one could not disagree.","properties":{"enabled":{"title":"Enabled","type":"boolean"}},"required":["enabled"],"title":"OrgProviderKeyModelUpdateRequest","type":"object"},"OrgProviderKeyModelPublic":{"description":"One offered model, with the rate the caller's organization is charged for it.\n\n``price_source`` says which rung of ``services.pricing_service`` answered:\n``organization`` for a rate an admin set, ``defaults`` for the\ncommunity-maintained rate this surface seeded or the models.dev fallback,\n``deployment`` for the deployment's own price list, and None when nothing\nprices the model yet. ``pricing_id`` names the organization's own row where\nthere is one, so a client can edit that rate without re-deriving the key.\n``unit`` says what the rates are per, as on a pricing row: tokens, requests\nor images, so a per-request rate is not read as a per-token one.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"model":{"title":"Model","type":"string"},"org_provider_key_id":{"format":"uuid","title":"Org Provider Key Id","type":"string"},"output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Price Per Million"},"price_source":{"anyOf":[{"enum":["organization","deployment","defaults"],"type":"string"},{"type":"null"}],"title":"Price Source"},"pricing_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Pricing Id"},"unit":{"default":"tokens","title":"Unit","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","org_provider_key_id","model","enabled","created_at"],"title":"OrgProviderKeyModelPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/models/{model_id}":{"patch":{"description":"Turn one offered model's serving switch on or off. Organization owners and admins only.","operationId":"provider-keys-set_org_provider_key_model_enabled","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}},{"in":"path","name":"model_id","required":true,"schema":{"format":"uuid","title":"Model Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyModelUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyModelPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Org Provider Key Model Enabled","tags":["provider-keys"]}}}}
```

## Remove Org Provider Key Model

> Stop offering one model. Its rate and its history stay. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"Message":{"description":"A human-readable acknowledgment for an operation with nothing to return.","properties":{"message":{"description":"What happened.","title":"Message","type":"string"}},"required":["message"],"title":"Message","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/models/{model_id}":{"delete":{"description":"Stop offering one model. Its rate and its history stay. Organization owners and admins only.","operationId":"provider-keys-remove_org_provider_key_model","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}},{"in":"path","name":"model_id","required":true,"schema":{"format":"uuid","title":"Model Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Remove Org Provider Key Model","tags":["provider-keys"]}}}}
```

## Refresh Org Provider Key Model Pricing

> 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.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderModelsRefreshPublic":{"description":"What a refresh did: what it newly offered, what it repriced, and the list's new size.\n\nFailure is a field rather than a status, for the reason\n``OrgProviderAvailableModelsPublic`` gives: the list is still standing, and\nthe panel renders the reason beside it.","properties":{"added":{"items":{"type":"string"},"title":"Added","type":"array"},"count":{"title":"Count","type":"integer"},"discovery_unsupported":{"default":false,"title":"Discovery Unsupported","type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"repriced":{"items":{"type":"string"},"title":"Repriced","type":"array"}},"required":["added","repriced","count"],"title":"OrgProviderModelsRefreshPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/pricing/refresh":{"post":{"description":"Move every rate this surface seeded onto today's community default.\n\nThe other half of the refresh above, without the dial: re-reading community\nrates is cheap and asking a provider for its whole catalog is not, so an\nadmin who only wants the price move does not wait on an upstream. A rate an\nadmin has since set is left alone, and a model that arrived unpriced is\noffered a rate and switched on if one has appeared. Organization owners and\nadmins only.","operationId":"provider-keys-refresh_org_provider_key_model_pricing","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderModelsRefreshPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Refresh Org Provider Key Model Pricing","tags":["provider-keys"]}}}}
```

## Restore Org Provider Key

> Restore an archived key. Organization owners and admins only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"OrgProviderKeyPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"client_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Args"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"offered_count":{"description":"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.","title":"Offered Count","type":"integer"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"serving_count":{"description":"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.","title":"Serving Count","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"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.","title":"Usable","type":"boolean"}},"required":["id","organization_id","provider","name","is_org_default","usable","offered_count","serving_count","created_at"],"title":"OrgProviderKeyPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/organizations/me/provider-keys/{key_id}/restore":{"post":{"description":"Restore an archived key. Organization owners and admins only.","operationId":"provider-keys-restore_org_provider_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Restore Org Provider Key","tags":["provider-keys"]}}}}
```

## List Workspace Provider Keys

> The effective view of every key visible to this workspace. Any member of the workspace may read it.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceProviderKeyOverridesPublic":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkspaceProviderKeyOverridePublic"},"title":"Data","type":"array"}},"required":["data"],"title":"WorkspaceProviderKeyOverridesPublic","type":"object"},"WorkspaceProviderKeyOverridePublic":{"description":"The effective view for one workspace+key: raw override flags plus the resolution.","properties":{"allowed_models":{"items":{"type":"string"},"title":"Allowed Models","type":"array"},"disabled":{"title":"Disabled","type":"boolean"},"is_default":{"title":"Is Default","type":"boolean"},"is_effective_default":{"title":"Is Effective Default","type":"boolean"},"is_effective_enabled":{"title":"Is Effective Enabled","type":"boolean"},"org_provider_key_id":{"format":"uuid","title":"Org Provider Key Id","type":"string"},"usable":{"title":"Usable","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["workspace_id","org_provider_key_id","is_default","disabled","is_effective_default","is_effective_enabled","usable","allowed_models"],"title":"WorkspaceProviderKeyOverridePublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys":{"get":{"description":"The effective view of every key visible to this workspace. Any member of the workspace may read it.","operationId":"provider-keys-list_workspace_provider_keys","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceProviderKeyOverridesPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Workspace Provider Keys","tags":["provider-keys"]}}}}
```

## Set Workspace Provider Key Override

> Pin or disable a key for this workspace. Organization owners/admins or this workspace's owners/admins.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceProviderKeyOverrideRequest":{"description":"Tri-state: an omitted field leaves that flag unchanged.\n\nBoth fields false, whether that is the merged result or a value sent\nexplicitly, is a no-op the service deletes rather than stores: absence of\na row already means full inheritance from the organization default.\nSetting one true auto-resolves the other when they would otherwise\nconflict (pinning re-enables a disabled key; disabling un-pins a pinned\none); sending both true explicitly is refused.","properties":{"disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disabled"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"title":"WorkspaceProviderKeyOverrideRequest","type":"object"},"WorkspaceProviderKeyOverridePublic":{"description":"The effective view for one workspace+key: raw override flags plus the resolution.","properties":{"allowed_models":{"items":{"type":"string"},"title":"Allowed Models","type":"array"},"disabled":{"title":"Disabled","type":"boolean"},"is_default":{"title":"Is Default","type":"boolean"},"is_effective_default":{"title":"Is Effective Default","type":"boolean"},"is_effective_enabled":{"title":"Is Effective Enabled","type":"boolean"},"org_provider_key_id":{"format":"uuid","title":"Org Provider Key Id","type":"string"},"usable":{"title":"Usable","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["workspace_id","org_provider_key_id","is_default","disabled","is_effective_default","is_effective_enabled","usable","allowed_models"],"title":"WorkspaceProviderKeyOverridePublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys/{key_id}":{"patch":{"description":"Pin or disable a key for this workspace. Organization owners/admins or this workspace's owners/admins.","operationId":"provider-keys-set_workspace_provider_key_override","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceProviderKeyOverrideRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceProviderKeyOverridePublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Workspace Provider Key Override","tags":["provider-keys"]}}}}
```

## Reset Workspace Provider Key Override

> Remove this workspace's override, reverting to full inheritance. Idempotent.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"Message":{"description":"A human-readable acknowledgment for an operation with nothing to return.","properties":{"message":{"description":"What happened.","title":"Message","type":"string"}},"required":["message"],"title":"Message","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys/{key_id}":{"delete":{"description":"Remove this workspace's override, reverting to full inheritance. Idempotent.","operationId":"provider-keys-reset_workspace_provider_key_override","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Reset Workspace Provider Key Override","tags":["provider-keys"]}}}}
```

## List Workspace Provider Key Model Restrictions

> List this workspace's model allow-list for a key. Empty means every model is allowed.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceProviderModelRestrictionsPublic":{"properties":{"models":{"items":{"type":"string"},"title":"Models","type":"array"}},"required":["models"],"title":"WorkspaceProviderModelRestrictionsPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models":{"get":{"description":"List this workspace's model allow-list for a key. Empty means every model is allowed.","operationId":"provider-keys-list_workspace_provider_key_model_restrictions","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceProviderModelRestrictionsPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Workspace Provider Key Model Restrictions","tags":["provider-keys"]}}}}
```

## Add Workspace Provider Key Model Restriction

> Narrow this workspace's allow-list for a key to include one more model. Idempotent.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceProviderModelRestrictionRequest":{"properties":{"model":{"maxLength":255,"title":"Model","type":"string"}},"required":["model"],"title":"WorkspaceProviderModelRestrictionRequest","type":"object"},"Message":{"description":"A human-readable acknowledgment for an operation with nothing to return.","properties":{"message":{"description":"What happened.","title":"Message","type":"string"}},"required":["message"],"title":"Message","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models":{"post":{"description":"Narrow this workspace's allow-list for a key to include one more model. Idempotent.","operationId":"provider-keys-add_workspace_provider_key_model_restriction","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceProviderModelRestrictionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Add Workspace Provider Key Model Restriction","tags":["provider-keys"]}}}}
```

## Remove Workspace Provider Key Model Restriction

> Remove one model from this workspace's allow-list for a key. Idempotent.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"Message":{"description":"A human-readable acknowledgment for an operation with nothing to return.","properties":{"message":{"description":"What happened.","title":"Message","type":"string"}},"required":["message"],"title":"Message","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/provider-keys/{key_id}/models/{model}":{"delete":{"description":"Remove one model from this workspace's allow-list for a key. Idempotent.","operationId":"provider-keys-remove_workspace_provider_key_model_restriction","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}},{"in":"path","name":"model","required":true,"schema":{"title":"Model","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Remove Workspace Provider Key Model Restriction","tags":["provider-keys"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/otari/for-integrators/api-reference/provider-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
