Create model in organization
Creates an organization's model, through one of its providers, which it shares with projects; or a project's, which adopts with source a model its organization shares with it, or goes with provider through the project's own provider or one its organization shares with it. Sharing an organization's model with projects (availability) also takes llmgateway.models.setAvailability. A project's model through its own provider fails with failed_precondition, and the reason POLICY_VIOLATED, where a policy enforces llmgateway.projectProvidersDisabled.
Creates an organization's model, through one of its providers, which it shares with projects; or a project's, which adopts with source a model its organization shares with it, or goes with provider through the project's own provider or one its organization shares with it.
Sharing an organization's model with projects (availability) also takes llmgateway.models.setAvailability. A project's model through its own provider fails with failed_precondition, and the reason POLICY_VIOLATED, where a policy enforces llmgateway.projectProvidersDisabled.
bearerAuthorizationBearer <token>An access token, or an API key.
organization*stringThe organization's ID.
^org_[0-7][0-9a-hjkmnp-tv-z]{25}$application/json- body
alias?stringWhat callers send as model in their requests, such as gpt-5 or fast; unique in the organization, or in the project. Letters, digits and .-_:/@, starting with a letter or a digit, at most 128. Required, but for a model a project adopts, whose alias is its source's unless set.
^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,127}$availability?For an organization's model: the projects it is shared with, which may adopt it. None, unless set. Setting it also takes llmgateway.models.setAvailability.
displayName?stringName shown in user interfaces. Defaults to the provider model's name, if kosem knows it, or to the alias; for an adopted model, to its source's.
length <= 100provider?stringThe provider that requests go through: for an organization's model, one of its own; for a project's own model, the project's own, projects/{project_id}/providers/{provider_id}, or one its organization shares with it.
^(organizations/org|projects/prj)_[0-7][0-9a-hjkmnp-tv-z]{25}/providers/prv_[0-7][0-9a-hjkmnp-tv-z]{25}$providerModel?stringWith provider: the provider's name for the model, such as gpt-5-mini.
length <= 256source?stringFor a project's model that adopts one of its organization's: that model, shared with the project. A project's model takes source, or provider and providerModel for one of its own.
^organizations/org_[0-7][0-9a-hjkmnp-tv-z]{25}/models/mdl_[0-7][0-9a-hjkmnp-tv-z]{25}$Created
application/json- response
alias*stringWhat callers send as model in their requests, such as gpt-5 or fast; unique in the organization, or in the project for a project's model.
availability*For an organization's model: the projects it is shared with, which may adopt it. A project's model is shared with none.
createTime*stringWhen the model was created.
date-timedisplayName*stringName shown in user interfaces. An adopted model shows its source's unless it has its own.
formats*array<>The request formats the gateway serves, directly or by translation. Translation supports stateless generation; provider-specific features without an equivalent are refused.
info?What kosem knows of the provider's model; absent when it does not know it.
name*stringResource name, organizations/{organization_id}/models/{model_id} or projects/{project_id}/models/{model_id}.
nativeFormats*array<>Formats served directly by the provider, without translation.
pricing?The pricing given the model, as kosem knows no list prices for its provider's model; absent when it has none. Requests are priced at it, for usage and spend limits, while info.pricing is absent. An adopted model shows its source's.
provider*stringThe provider that requests go through: organizations/{organization_id}/providers/{provider_id}, of the model's organization; or, for a project's own model, projects/{project_id}/providers/{provider_id}, the project's own. An adopted model shows its source's.
providerModel*stringThe provider's name for the model, such as gpt-5-mini, which replaces alias in requests sent to it. An adopted model shows its source's.
providerType*stringThe type of the model's provider, such as providerTypes/openai, which never changes. Those who may call the model see it, though they may not see the provider.
source*stringFor a model a project adopted: the organization's model, organizations/{organization_id}/models/{model_id}, which serves its requests; empty for any other. Set when the model is created, and never changed.
state*stringWhether a project's model serves requests: NEEDS_ATTENTION, serving nothing, while its source, or its provider, its organization's, is no longer shared with its project, or while a policy enforces llmgateway.projectProvidersDisabled and it goes through the project's own provider. An organization's model is ACTIVE.
"ACTIVE""NEEDS_ATTENTION"stateReason*stringWhy the model needs attention, when it does.
updateTime*stringWhen the model was last updated.
date-timecurl -X POST 'https://api.kosem.ai/v1/organizations/string/models' \
-H 'Content-Type: application/json' \
-d '{}'{
"alias": "string",
"availability": {
"allProjects": true,
"projects": [
"string"
]
},
"createTime": "2019-08-24T14:15:22Z",
"displayName": "string",
"formats": [
"ANTHROPIC_MESSAGES"
],
"info": {
"contextWindow": 0,
"deprecated": true,
"displayName": "string",
"inputs": [
"string"
],
"maxInputTokens": 0,
"maxOutputTokens": 0,
"pricing": {
"cacheRead": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"cacheWrite": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"input": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"output": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
}
},
"reasoning": true,
"reasoningEfforts": [
"string"
],
"structuredOutput": true,
"toolCalls": true
},
"name": "string",
"nativeFormats": [
"ANTHROPIC_MESSAGES"
],
"pricing": {
"cacheRead": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"cacheWrite": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"input": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"output": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"pricedLike": {
"provider": "string",
"providerModel": "string"
}
},
"provider": "string",
"providerModel": "string",
"providerType": "string",
"source": "string",
"state": "ACTIVE",
"stateReason": "string",
"updateTime": "2019-08-24T14:15:22Z"
}