Create a custom model

Create a new custom model or update an existing one (upsert by model_name). Custom models allow organization-specific configurations with custom pricing, capabilities, and provider associations.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
model_namestringRequired
Unique model name. Used to reference the model in API calls.
base_model_namestringOptional
Base model to inherit properties from.
display_namestringOptional

Human-readable display name.

custom_provider_idstringOptional
ID of the custom provider to associate.
provider_idstringOptional

Alternative to custom_provider_id.

input_costdoubleOptional

Cost per 1M input tokens (USD).

output_costdoubleOptional

Cost per 1M output tokens (USD).

cache_hit_input_costdoubleOptional

Cost per 1M cached input tokens (USD).

cache_creation_input_costdoubleOptional

Cost per 1M cache creation tokens (USD).

max_context_windowintegerOptional
Maximum context window size.
streaming_supportenumOptional

Streaming support. 0 = no, 1 = yes.

Allowed values:
function_callenumOptional

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

Allowed values:
image_supportenumOptional

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

Allowed values:
supported_params_overrideobjectOptional
Override UI parameter support for Playground.

Response

Created/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

400
Bad Request Error
401
Unauthorized Error