> 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/api-reference/provider-endpoints.md).

# Provider endpoints

## List Provider Endpoints

> List owned provider endpoints, narrowed by owner when given. Keys are never returned.

```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":{"ProviderEndpointsPublic":{"properties":{"count":{"title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/ProviderEndpointPublic"},"title":"Data","type":"array"}},"required":["data","count"],"title":"ProviderEndpointsPublic","type":"object"},"ProviderEndpointPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"title":"Api Base","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Params"},"id":{"format":"uuid","title":"Id","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["id","workspace_id","name","provider","api_base","created_at"],"title":"ProviderEndpointPublic","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/provider-endpoints":{"get":{"description":"List owned provider endpoints, narrowed by owner when given. Keys are never returned.","operationId":"provider-endpoints-list_provider_endpoints","parameters":[{"description":"Only endpoints this workspace owns.","in":"query","name":"workspace_id","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Only endpoints this workspace owns.","title":"Workspace Id"}},{"description":"Only endpoints this user owns.","in":"query","name":"user_id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only endpoints this user owns.","title":"User Id"}},{"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/ProviderEndpointsPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Provider Endpoints","tags":["provider-endpoints"]}}}}
```

## Create Provider Endpoint

> Register an endpoint for a workspace, or for one user in it.\
> \
> It is reachable as \`\`\<name>:\<model>\`\` by its owner as soon as this returns on\
> this worker, and on the others within 30 seconds.

```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":{"ProviderEndpointCreateRequest":{"description":"What a caller sends to create an owned endpoint. The key is stored encrypted.","properties":{"api_base":{"description":"Base URL of the endpoint. Refused when it resolves to a private, loopback, link-local or reserved address.","maxLength":1024,"title":"Api Base","type":"string"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sent to the endpoint. Never returned, only its last four.","title":"Api Key"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Fields added to every request body sent to this endpoint, beneath the caller's own: a field the caller sets wins. For fields the gateway does not model, such as vLLM's 'chat_template_kwargs'. Credential and transport fields are refused.","title":"Default Params"},"name":{"description":"What callers put before the colon to reach this endpoint, as '<name>:<model>'. Letters, digits, '.', '_' and '-', starting with a letter or digit. It may not be a provider's name or a configured instance's.","maxLength":64,"title":"Name","type":"string"},"provider":{"description":"The implementation that speaks to the endpoint: 'openai' for an OpenAI-compatible server, 'anthropic' for an Anthropic-compatible one. Whichever it is, callers may use any of the chat, responses and messages routes.","maxLength":64,"title":"Provider","type":"string"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User that owns the endpoint. Omit for one every caller in the workspace reaches. A user's endpoint shadows a workspace-wide one of the same name for that user alone.","title":"User Id"},"workspace_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Workspace that owns the endpoint. Omit for the deployment's default workspace.","title":"Workspace Id"}},"required":["name","provider","api_base"],"title":"ProviderEndpointCreateRequest","type":"object"},"ProviderEndpointPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"title":"Api Base","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Params"},"id":{"format":"uuid","title":"Id","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["id","workspace_id","name","provider","api_base","created_at"],"title":"ProviderEndpointPublic","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/provider-endpoints":{"post":{"description":"Register an endpoint for a workspace, or for one user in it.\n\nIt is reachable as ``<name>:<model>`` by its owner as soon as this returns on\nthis worker, and on the others within 30 seconds.","operationId":"provider-endpoints-create_provider_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Create Provider Endpoint","tags":["provider-endpoints"]}}}}
```

## Get Provider Endpoint

> Read one endpoint. The key is never returned, only its last four characters.

```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":{"ProviderEndpointPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"title":"Api Base","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Params"},"id":{"format":"uuid","title":"Id","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["id","workspace_id","name","provider","api_base","created_at"],"title":"ProviderEndpointPublic","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/provider-endpoints/{endpoint_id}":{"get":{"description":"Read one endpoint. The key is never returned, only its last four characters.","operationId":"provider-endpoints-get_provider_endpoint","parameters":[{"in":"path","name":"endpoint_id","required":true,"schema":{"format":"uuid","title":"Endpoint Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Provider Endpoint","tags":["provider-endpoints"]}}}}
```

## Update Provider Endpoint

> Change an endpoint's name, provider, base URL, key or default fields. The owner cannot change.

```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":{"ProviderEndpointUpdateRequest":{"description":"A partial update. Only what is set is applied; an explicit null ``api_key`` clears it.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"description":"Base URL of the endpoint. Refused when it resolves to a private, loopback, link-local or reserved address.","title":"Api Base"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Fields added to every request body sent to this endpoint, beneath the caller's own: a field the caller sets wins. For fields the gateway does not model, such as vLLM's 'chat_template_kwargs'. Credential and transport fields are refused.","title":"Default Params"},"name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"description":"What callers put before the colon to reach this endpoint, as '<name>:<model>'. Letters, digits, '.', '_' and '-', starting with a letter or digit. It may not be a provider's name or a configured instance's.","title":"Name"},"provider":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"description":"The implementation that speaks to the endpoint: 'openai' for an OpenAI-compatible server, 'anthropic' for an Anthropic-compatible one. Whichever it is, callers may use any of the chat, responses and messages routes.","title":"Provider"}},"title":"ProviderEndpointUpdateRequest","type":"object"},"ProviderEndpointPublic":{"description":"The API-facing shape. Never carries the key, only whether one is set.","properties":{"api_base":{"title":"Api Base","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"default_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Params"},"id":{"format":"uuid","title":"Id","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["id","workspace_id","name","provider","api_base","created_at"],"title":"ProviderEndpointPublic","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/provider-endpoints/{endpoint_id}":{"patch":{"description":"Change an endpoint's name, provider, base URL, key or default fields. The owner cannot change.","operationId":"provider-endpoints-update_provider_endpoint","parameters":[{"in":"path","name":"endpoint_id","required":true,"schema":{"format":"uuid","title":"Endpoint Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Update Provider Endpoint","tags":["provider-endpoints"]}}}}
```

## Delete Provider Endpoint

> Delete an endpoint. Its name stops resolving at once on this worker, within 30 seconds elsewhere.

```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":{"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/provider-endpoints/{endpoint_id}":{"delete":{"description":"Delete an endpoint. Its name stops resolving at once on this worker, within 30 seconds elsewhere.","operationId":"provider-endpoints-delete_provider_endpoint","parameters":[{"in":"path","name":"endpoint_id","required":true,"schema":{"format":"uuid","title":"Endpoint Id","type":"string"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Provider Endpoint","tags":["provider-endpoints"]}}}}
```


---

# 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/api-reference/provider-endpoints.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.
