Create a model provider
Binds one of your own provider accounts (BYOK) to a workspace, by an API key or by a role in your own cloud account that trusts this workspace. Platform providers are published by Subako and are not created here.
POST
/v1/model-providersAuthorization
AuthorizationBearer token · headerrequiredHeader parameters
Idempotency-KeystringRetry 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/jsonapi_keystring | nullShorthand for an `api_key` auth. Send this or `auth`, exactly one.
min length 1 · max length 16384
authany | ModelProviderAuthInputShow propertiesHide properties
One of:
any
anyModelProviderAuthInput
One of:
object
api_keystringrequiredWrite-only: no route answers with a key.
min length 1 · max length 16384
typestringrequiredAllowed:
api_keyobject
regionstringrequiredThe region the role's signatures are scoped to, which the base
URL's host must name.
max length 32
role_arnstringrequiredThe IAM role to assume, `arn:aws:iam::<account>:role/<name>`. Its
trust policy must admit this workspace's subject alone.
max length 2048
typestringrequiredAllowed:
aws_web_identityobject
federation_rule_idstringrequiredThe federation rule the workspace's token is checked against,
`fdrl_...`. Its match must admit this workspace's subject alone.
max length 128
organization_idstring<uuid>requiredThe Anthropic organization's id.
service_account_idstringrequiredThe service account the access token acts as, `svac_...`.
max length 128
typestringrequiredAllowed:
anthropic_workload_identityworkspace_idstring | nullThe Anthropic workspace the token is scoped to, `wrkspc_...`.
Required when the rule is enabled for more than one workspace.
max length 128
object
identity_provider_idstringrequiredThe workload identity provider that trusts this deployment's
issuer, as the OpenAI dashboard shows it.
max length 128
service_account_idstringrequiredThe service account the access token acts as. The provider's
mapping to it must admit this workspace's subject alone.
max length 128
typestringrequiredAllowed:
openai_workload_identitybase_urlstringrequiredThe 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
descriptionstringmax length 1024 · default: ""
display_namestringrequiredmax length 200
formatModelProviderFormatBodyrequiredThe wire format a provider speaks, which decides the shape of the model
settings an agent config may carry for it.
Allowed:
anthropicopenai_responsesResponses
201Created BYOK provider binding; the API key is never returned.
One of:
object
created_atstring<date-time>requireddescriptionstringrequireddisplay_namestringrequiredformatModelProviderFormatBodyrequiredThe wire format a provider speaks, which decides the shape of the model
settings an agent config may carry for it.
Allowed:
anthropicopenai_responsesidstring<uuid>requiredupdated_atstring<date-time>requiredWhen the provider last changed: a rename, a new endpoint, or a new key.
modelsPlatformModelBody[]requiredModels available through this platform provider.
Show propertiesHide properties
Array of
PlatformModelBodydescriptionstringrequireddisplay_namestringrequiredmodelstringrequiredpriceany | ModelPriceBodyrequiredShow propertiesHide properties
One of:
any
anyModelPriceBody
One of:
object
formatstringrequiredAllowed:
anthropicper_tokenAnthropicPriceBodyrequiredShow propertiesHide properties
cache_readinteger<int64>requiredcache_writeinteger<int64>requiredinputinteger<int64>requiredoutputinteger<int64>requiredobject
formatstringrequiredAllowed:
openai_responsesper_tokenOpenaiResponsesPriceBodyrequired`input` prices the input neither read from nor written to the cache,
`cached_input` the part read and `cache_write` the part written; `output`
prices every output token, reasoning included.
Show propertiesHide properties
cache_writeinteger<int64>requiredcached_inputinteger<int64>requiredinputinteger<int64>requiredoutputinteger<int64>requiredtypestringrequiredAllowed:
platformobject
created_atstring<date-time>requireddescriptionstringrequireddisplay_namestringrequiredformatModelProviderFormatBodyrequiredThe wire format a provider speaks, which decides the shape of the model
settings an agent config may carry for it.
Allowed:
anthropicopenai_responsesidstring<uuid>requiredupdated_atstring<date-time>requiredWhen the provider last changed: a rename, a new endpoint, or a new key.
authModelProviderAuthBodyrequiredHow a BYOK provider authenticates, as read back: a key never comes back,
so its arm says only that there is one.
Show propertiesHide properties
One of:
object
typestringrequiredAllowed:
api_keyobject
regionstringrequiredrole_arnstringrequiredtypestringrequiredAllowed:
aws_web_identityobject
federation_rule_idstringrequiredorganization_idstringrequiredservice_account_idstringrequiredtypestringrequiredAllowed:
anthropic_workload_identityworkspace_idstring | nullrequiredNull when the rule picks its one workspace itself.
object
identity_provider_idstringrequiredservice_account_idstringrequiredtypestringrequiredAllowed:
openai_workload_identitybase_urlstringrequiredWhere the proxy sends this provider's calls, as the workspace set
it. Its API key never comes back.
workspace_idstring<uuid>requiredtypestringrequiredAllowed:
byok400Malformed body, invalid provider configuration, a role that does not trust this workspace alone, or malformed workspace header.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired403Caller lacks model_provider.manage.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired404No such workspace, or the caller cannot see it.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired409Idempotency-Key was already used for a different request.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired429This workspace checked roles' trust too often in the last minute; try again later.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe 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_requestsinternalmessagestringrequired