Skip to Content
kosemdocs
ReferenceAPIModels

Update model in project

Changes a model's alias, display name or own pricing, and an organization's model the projects it is shared with. Where a model goes never changes: another provider model takes another model. Sharing an organization's model otherwise also takes llmgateway.models.setAvailability. Taking a project out takes effect within seconds: what it adopted of the model serves nothing until the model is shared with it again, and shows as needing attention. An adopted model's pricing is its source's.

PATCH
/v1/projects/{project}/models/{model}

Changes a model's alias, display name or own pricing, and an organization's model the projects it is shared with. Where a model goes never changes: another provider model takes another model.

Sharing an organization's model otherwise also takes llmgateway.models.setAvailability. Taking a project out takes effect within seconds: what it adopted of the model serves nothing until the model is shared with it again, and shows as needing attention. An adopted model's pricing is its source's.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$
model*string

The model's ID.

Match^mdl_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request Body

application/json
  1. body
alias?string

What callers send as model in their requests.

Match^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,127}$
availability?

For an organization's model: the projects it is shared with. Changing it also takes llmgateway.models.setAvailability. Taking a project out takes effect within seconds: what the project adopted of the model serves nothing until it is shared with it again, and shows as needing attention.

displayName?string

Name shown in user interfaces; empty takes the default, which for an adopted model is its source's.

Lengthlength <= 100
pricing?|

The model's own pricing, replacing what it has, or null to remove it. Only a model whose list prices kosem doesn't know takes one (else failed_precondition), and not an adopted model, which is priced as its source; requests from then on are priced at it.

Response Body

OK

application/json
  1. response
alias*string

What 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*string

When the model was created.

Formatdate-time
displayName*string

Name 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*string

Resource 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*string

The 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*string

The 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*string

The 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*string

For 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*string

Whether 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.

Value in"ACTIVE""NEEDS_ATTENTION"
stateReason*string

Why the model needs attention, when it does.

updateTime*string

When the model was last updated.

Formatdate-time
Example Request
curl -X PATCH 'https://api.kosem.ai/v1/projects/string/models/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "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"
}