Skip to content
Subako Docs
Esc
navigateopen⌘Jpreview

POST /v1/model-providers

POST/v1/model-providers
Authorization
AuthorizationBearer token · headerrequired
Header parameters
Idempotency-Keystring
Retry the same operation with this key to return its saved receipt. Scoped by the operation's authenticated caller or resource. A different input under the same key returns 409. Receipts are retained for at least 7 days after completion, then removed by an hourly sweep. After removal the key can execute again. Fresh-only secrets are never included in a replay.
min length 1 · max length 255
Kikuvi-Workspacestring<uuid>
Workspace to create in. Required for a user caller; implied by the key for an API key caller.
Request body
requiredapplication/json
api_keystringrequired
min length 1 · max length 16384
base_urlstringrequired
The upstream base URL, spelled the way this format's own client spells it: `https://api.anthropic.com` for anthropic, `https://api.openai.com/v1` for openai_responses. The proxy appends only the endpoint path, so a provider that puts its version segment somewhere else is written out that way here.
max length 2048
descriptionstring
max length 1024 · default: ""
display_namestringrequired
max length 200
formatModelProviderFormatBodyrequired
Mirrors `ModelProviderFormat`'s spellings rather than deriving serde on the domain type: renaming a domain variant must not silently change the wire.
Allowed:anthropicopenai_responses
Responses
201Created BYOK provider binding; the API key is never returned.
One of:
object
created_atstring<date-time>required
descriptionstringrequired
display_namestringrequired
formatModelProviderFormatBodyrequired
Mirrors `ModelProviderFormat`'s spellings rather than deriving serde on the domain type: renaming a domain variant must not silently change the wire.
Allowed:anthropicopenai_responses
idstring<uuid>required
modelsPlatformModelBody[]required
Models available through this platform provider.
Show properties
Array of PlatformModelBody
descriptionstringrequired
display_namestringrequired
modelstringrequired
typestringrequired
Allowed:platform
object
created_atstring<date-time>required
descriptionstringrequired
display_namestringrequired
formatModelProviderFormatBodyrequired
Mirrors `ModelProviderFormat`'s spellings rather than deriving serde on the domain type: renaming a domain variant must not silently change the wire.
Allowed:anthropicopenai_responses
idstring<uuid>required
workspace_idstring<uuid>required
typestringrequired
Allowed:byok
400Malformed body, invalid provider configuration, or malformed workspace header.
errorErrorDetailrequired
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403Caller lacks model_provider.manage.
errorErrorDetailrequired
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such workspace, or the caller cannot see it.
errorErrorDetailrequired
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
409Idempotency-Key was already used for a different request.
errorErrorDetailrequired
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.us.cloud.subako.ai/v1/model-providers" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "string",
  "base_url": "string",
  "description": "",
  "display_name": "string",
  "format": "anthropic"
}'
Response
{
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "display_name": "string",
  "format": "anthropic",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "models": [
    {
      "description": "string",
      "display_name": "string",
      "model": "string"
    }
  ],
  "type": "platform"
}