Skip to main content
PATCH
Update model

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Headers

Prefer
string

Send return=minimal to get no body back from a write and skip reading the resource: a create answers 201 with only Location, and an update answers 204.

Example:

"return=minimal"

Path Parameters

id
string
required

Model ID

Body

application/json
id
string | null

Read-only: the server sets it, and a value sent here is ignored.

userId
string | null

Read-only: the server sets it, and a value sent here is ignored.

createdAt
string<date-time> | null

Read-only: the server sets it, and a value sent here is ignored.

deletedAt
string<date-time> | null

Read-only: the server sets it, and a value sent here is ignored.

name
string
Example:

"GPT-4"

organizationId
string | null

The organization that owns the model. null makes it global, which only a platform admin may do.

Example:

"org_123"

inputCostPerToken
number | null
Example:

0.00001

outputCostPerToken
number | null
Example:

0.00003

cacheReadInputTokenCost
number | null
Example:

0.000005

cacheCreationInputTokenCost
number | null
Example:

0.000015

inputCostPerTokenAbove128kTokens
number | null
Example:

0.00002

outputCostPerTokenAbove128kTokens
number | null
Example:

0.00006

tokenizerProvider
string | null
Example:

"OPENAI"

source
enum<string> | null
Available options:
PREDEFINED,
CUSTOM
Example:

"CUSTOM"

Response

Model updated successfully. The body is the resource as its GET answers it.

id
string
required
Example:

"model_123"

organizationId
string | null
required
Example:

"org_123"

userId
string | null
required
Example:

"user_123"

name
string
required
Example:

"GPT-4"

inputCostPerToken
number | null
required
Example:

0.00001

outputCostPerToken
number | null
required
Example:

0.00003

cacheReadInputTokenCost
number | null
required
Example:

0.000005

cacheCreationInputTokenCost
number | null
required
Example:

0.000015

inputCostPerTokenAbove128kTokens
number | null
required
Example:

0.00002

outputCostPerTokenAbove128kTokens
number | null
required
Example:

0.00006

tokenizerProvider
string | null
required
Example:

"OPENAI"

source
enum<string> | null
required
Available options:
PREDEFINED,
CUSTOM
Example:

"PREDEFINED"

createdAt
string<date-time>
required
deletedAt
string<date-time> | null
required