Update a custom model

Update a custom model. Only provided fields are updated. The model_name field is read-only. Only the owning organization can update their custom models.

Path parameters

model_namestringRequired
The model's unique name to update.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
display_namestringOptional
Display name.
base_model_namestringOptional
Base model.
custom_provider_idstringOptional
Custom provider ID.
input_costdoubleOptional

Cost per 1M input tokens (USD).

output_costdoubleOptional

Cost per 1M output tokens (USD).

cache_hit_input_costdoubleOptional
cache_creation_input_costdoubleOptional
max_context_windowintegerOptional
streaming_supportenumOptional
Allowed values:
function_callenumOptional
Allowed values:
image_supportenumOptional
Allowed values:
supported_params_overrideobjectOptional

Response

Updated model.
idstring
Model ID.
model_namestring
Unique model name.
display_namestring
Display name.
base_model_namestring
Base model inherited from.
affiliation_categoryenum
Model type.
Allowed values:
input_costdouble

Cost per 1M input tokens (USD).

output_costdouble

Cost per 1M output tokens (USD).

cache_hit_input_costdouble

Cost per 1M cached input tokens (USD).

cache_creation_input_costdouble

Cost per 1M cache creation tokens (USD).

max_context_windowinteger
Maximum context window size.
streaming_supportinteger

Streaming support. 0 = no, 1 = yes.

function_callinteger

Function calling support. 0 = no, 1 = yes.

image_supportinteger

Image/vision support. 0 = no, 1 = yes.

sourceenum
Model source.
Allowed values:
providerobject
Associated provider.

Errors

401
Unauthorized Error
404
Not Found Error