Workspace-providers
Bring your own model providers (Pro and Enterprise): a workspace connects its own Azure OpenAI, Amazon Bedrock, Google Vertex AI / Gemini, OpenAI, Anthropic or any OpenAI-compatible endpoint with its own key (stored encrypted, never returned) and maps catalogue targets to models on it.
Bring your own model providers (Pro and Enterprise): a workspace connects its own Azure OpenAI, Amazon Bedrock, Google Vertex AI / Gemini, OpenAI, Anthropic or any OpenAI-compatible endpoint with its own key (stored encrypted, never returned) and maps catalogue targets to models on it. Its `/route` (`execute=true`), `/v1/chat/completions` and MCP `ask` calls then run on that endpoint; unmapped targets keep the platform's providers. Reading needs membership, writing the `admin` role.
get/api/v1/workspace/providers
List Providers
The workspace's providers (keys masked), their target mappings, what the platform executes on for
comparison, the presets and the targets that can be mapped. `enabled` says whether the plan includes
the feature; without it the list is read-only and empty.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/workspace/providers" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/workspace/providers
Create Provider
Connect an OpenAI-compatible endpoint with the workspace's own credentials (stored encrypted).
Requires an API key.
Request bodyWorkspaceProviderIn
| Field | Type | Default | Description |
|---|---|---|---|
| api_key | string | null | ||
| api_key_header | string | null | ||
| base_url(required) | string | ||
| enabled | boolean | true | |
| extra_headers | object<string> | ||
| kind | string | "custom" | |
| max_retries | integer | 2 | |
| name(required) | string | ||
| notes | string | "" | |
| timeout_s | number | 60 |
Responses
| 201 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/workspace/providers" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "base_url": "string", "name": "default" }'{
"base_url": "string",
"name": "default"
}put/api/v1/workspace/providers/models/{target_id}
Map Target
Execute `target_id on the workspace's provider_id as model` (optional system prompt and
request defaults). Replaces an earlier mapping of the same target.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| target_id(required) | path | string |
Request bodyWorkspaceMappingIn
| Field | Type | Default | Description |
|---|---|---|---|
| defaults | object | ||
| model(required) | string | ||
| provider_id(required) | string | ||
| system_prompt | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PUT "$OSR_URL/api/v1/workspace/providers/models/<target_id>" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "auto", "provider_id": "string" }'{
"model": "auto",
"provider_id": "string"
}delete/api/v1/workspace/providers/models/{target_id}
Unmap Target
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| target_id(required) | path | string |
Responses
| 204 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/workspace/providers/models/<target_id>" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/workspace/providers/{provider_id}
Get Provider
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| provider_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/workspace/providers/<provider_id>" \
-H "Authorization: Bearer $OSR_API_KEY"patch/api/v1/workspace/providers/{provider_id}
Patch Provider
Change the endpoint, rotate the key (`api_key), drop it (clear_api_key`), disable or rename.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| provider_id(required) | path | string |
Request bodyWorkspaceProviderPatch
| Field | Type | Default | Description |
|---|---|---|---|
| api_key | string | null | ||
| api_key_header | string | null | ||
| base_url | string | null | ||
| clear_api_key | boolean | false | |
| enabled | boolean | null | ||
| extra_headers | object<string> | null | ||
| kind | string | null | ||
| max_retries | integer | null | ||
| name | string | null | ||
| notes | string | null | ||
| timeout_s | number | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PATCH "$OSR_URL/api/v1/workspace/providers/<provider_id>" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "api_key": "string", "api_key_header": "string", "base_url": "string", "enabled": false, "extra_headers": {}, "kind": "string", "max_retries": 1, "name": "default" }'{
"api_key": "string",
"api_key_header": "string",
"base_url": "string",
"enabled": false,
"extra_headers": {},
"kind": "string",
"max_retries": 1,
"name": "default"
}delete/api/v1/workspace/providers/{provider_id}
Delete Provider
Remove the provider and every mapping on it; the targets fall back to the platform's providers.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| provider_id(required) | path | string |
Responses
| 204 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/workspace/providers/<provider_id>" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/workspace/providers/{provider_id}/check
Check Provider
Call the endpoint's `/models` with the stored credentials: reachability, latency, upstream model ids.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| provider_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/workspace/providers/<provider_id>/check" \
-H "Authorization: Bearer $OSR_API_KEY"Model providers
Model providers: `GET /providers` is the public, OpenRouter-style view of what this deployment executes on (provider, upstream model, prices, health per executable target - never credentials); the `/admin/providers` endpoints add, check and map OpenAI-compatible endpoints at run time, and every API replica picks the change up without a restart.
User guide
The complete walkthrough: targets, rules, plans, real providers, execution, learning, the CLI and SKILL.md packages.