Create or update a custom model

Create an organization-specific custom model. If a model with the same model_name already exists in your organization, it is updated and the endpoint returns 200.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Request

This endpoint expects an object.
model_namestringRequired
Unique model name within your organization.
base_model_namestringOptional
Base model to inherit properties from.
display_namestringOptional

Human-readable display name.

custom_provider_idstringOptional
Custom provider string ID or provider identifier to associate.
provider_idstringOptional

Alternative to custom_provider_id.

input_costdoubleOptional
Cost per 1M input tokens in USD.
output_costdoubleOptional
Cost per 1M output tokens in USD.
cache_hit_input_costdoubleOptional
Cost per 1M cached input tokens in USD.
cache_creation_input_costdoubleOptional
Cost per 1M cache creation input tokens in USD.
max_context_windowintegerOptional
Maximum context window size.
streaming_supportenumOptional
Allowed values:
function_callenumOptional
Allowed values:
image_supportenumOptional
Allowed values:
supported_params_overridemap from strings to anyOptional

Partial override for model parameter support. The response returns computed supported_params.

Response

Updated existing model.
idstring

Model string ID. Same value as model_name.

model_namestring
Model name used in API calls.
display_namestring

Human-readable model name.

base_model_namestring
Base model inherited from, when configured.
affiliation_categoryenum

Whether the model is built in or organization-specific.

is_called_by_custom_nameboolean
Whether requests are sent upstream using this custom model name.
input_costdouble
Cost per 1M input tokens in USD.
output_costdouble
Cost per 1M output tokens in USD.
cache_hit_input_costdouble
Cost per 1M cached input tokens in USD.
cache_creation_input_costdouble
Cost per 1M cache creation input tokens in USD.
max_context_windowinteger
Maximum context window size.
streaming_supportenum

Streaming support. 0 = no, 1 = yes.

function_callenum

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

image_supportenum

Vision input support. 0 = no, 1 = yes.

sourceenum
Source of the model definition.
model_typeenum
Model type.
supported_paramsmap from strings to any

Computed parameter support after applying model-specific overrides.

throughputobject or null
providerobject
created_atdatetime or null
updated_atdatetime or null

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error