v1
protected
model-specs

Upsert Model Spec

Changed on

Create or update a model specification by provider and model name.

This endpoint is useful for bulk operations and bootstrapping.

post/v1/workspaces/{workspace}/model-specs/upsert

Request

Path parameters

workspacestring required

Slug of the workspace the request acts in

Request body

context_windowinteger nullable
default_context_strategystring nullable
descriptionstring nullable
display_namestring required
is_activeboolean
kind'chat' | 'embedding' | 'image' | 'video' | 'decision'

What a model produces, which decides every surface it may be bound to.

An agent's main model is chat; the media toolset takes image and video; the decide toolset and decision-backed trigger conditions take decision. A model has exactly one kind.

max_output_tokensinteger nullable
model_namestring required
provider_spec_idstring uuid required

Response

Successful Response

cache_creation_input_cost_per_tokenstring nullable
cached_input_cost_per_tokenstring nullable
context_windowinteger nullable required
created_atstring date-time required
default_context_strategystring nullable required
descriptionstring nullable required
display_namestring required
idstring required
input_cost_per_tokenstring nullable
is_activeboolean required
kind'chat' | 'embedding' | 'image' | 'video' | 'decision'

What a model produces, which decides every surface it may be bound to.

An agent's main model is chat; the media toolset takes image and video; the decide toolset and decision-backed trigger conditions take decision. A model has exactly one kind.

max_output_tokensinteger nullable
model_namestring required
output_cost_per_tokenstring nullable
provider_keystring nullable
provider_namestring nullable
provider_spec_idstring required
supports_function_callingboolean nullable
supports_reasoningboolean nullable
supports_visionboolean nullable
updated_atstring date-time required

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status