Models

Replace a custom model

Changed on

Replace editable fields for a custom model. The model_name path value remains the identifier.

put/api/models/{model_name}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/models/{model_name}/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

model_namestring required

Model name. The route supports names containing slashes, such as openai/gpt-4o-mini.

Request body

base_model_namestring

Base model to inherit properties from.

custom_provider_idstring

Custom provider string ID or provider identifier to associate.

provider_idstring

Alternative to custom_provider_id.

input_costnumber

Cost per 1M input tokens in USD.

output_costnumber

Cost per 1M output tokens in USD.

cache_hit_input_costnumber

Cost per 1M cached input tokens in USD.

cache_creation_input_costnumber

Cost per 1M cache creation input tokens in USD.

max_context_windowinteger

Maximum context window size.

function_call0 | 1
image_support0 | 1
supported_params_overrideobject

Partial override for the model's parameters: a map of parameter name to a parameter definition with the same shape as supported_params entries (name, type, default, range with min and max, description, required), or null to remove the parameter. Replaces any earlier override. The response returns the computed supported_params.

Example request

{
  "base_model_name": "gpt-4o",
  "custom_provider_id": "my-vllm",
  "provider_id": "my-vllm",
  "input_cost": 2.5,
  "output_cost": 10,
  "max_context_window": 128000
}

Response

Updated model.

idstring required

Model string ID. Same value as model_name.

model_namestring required

Model name used in API calls.

base_model_namestring

Base model inherited from, when configured.

affiliation_category'keywordsai' | 'custom'

keywordsai for built-in models, custom for your organization's models.

is_called_by_custom_nameboolean

Whether requests are sent upstream using this custom model name.

input_costnumber

Cost per 1M input tokens in USD.

output_costnumber

Cost per 1M output tokens in USD.

cache_hit_input_costnumber

Cost per 1M cached input tokens in USD.

cache_creation_input_costnumber

Cost per 1M cache creation input tokens in USD.

max_context_windowinteger

Maximum context window size.

function_call0 | 1

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

image_support0 | 1

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

model_type'chat' | 'embedding' | 'audio'

Model type.

supported_paramsobject

Computed parameter support after applying model-specific overrides.

Example response

{
  "id": "my-custom-gpt-4o",
  "model_name": "my-custom-gpt-4o",
  "base_model_name": "gpt-4o",
  "affiliation_category": "custom",
  "input_cost": 2.5,
  "output_cost": 10,
  "cache_hit_input_cost": 0.5,
  "cache_creation_input_cost": 3,
  "max_context_window": 128000,
  "function_call": 1,
  "image_support": 1,
  "model_type": "chat",
  "provider": {
    "id": "my-vllm",
    "provider_id": "my-vllm",
    "provider_name": "My vLLM Server",
    "extra_kwargs": {
      "base_url": "https://vllm.example.com/v1"
    }
  }
}

Changes

    • breaking

      request body became required

    • breaking

      removed the enum value 0 of the request property

    • breaking

      removed the enum value 0 of the request property

    • breaking

      removed the enum value 1 of the request property

    • breaking

      removed the enum value 1 of the request property

    • breaking

      the request property type changed from string to integer

    • breaking

      the request property type changed from string to integer

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response's property format changed from double to no format for status

    • breaking

      the response's property format changed from double to no format for status

    • breaking

      the response's property type changed from string to integer for status

    • breaking

      the response's property type changed from string to integer for status

    • breaking

      the response's property format changed from double to no format for status

    • breaking

      the response's property format changed from double to no format for status

    • warning

      added the new 0.00 enum value to the response property for the response status

    • warning

      added the new 0.00 enum value to the response property for the response status

    • warning

      added the new 1.00 enum value to the response property for the response status

    • warning

      added the new 1.00 enum value to the response property for the response status

    • info

      api operation id models_replaceCustomModel removed and replaced with replaceCustomModel

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Models added

    • info

      api tag models removed

    • info

      added the new 0.00 enum value to the request property

    • info

      added the new 0.00 enum value to the request property

    • info

      added the new 1.00 enum value to the request property

    • info

      added the new 1.00 enum value to the request property

    • info

      the request property format was generalized from double to no format

    • info

      the request property format was generalized from double to no format

    • info

      the request property format was generalized from double to no format

    • info

      the request property format was generalized from double to no format

    • info

      removed the 0 enum value from the response property for the response status

    • info

      removed the 0 enum value from the response property for the response status

    • info

      removed the 1 enum value from the response property for the response status

    • info

      removed the 1 enum value from the response property for the response status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      added the new keywordsai enum value to the response property for the response status

    • info

      removed the non-success response with the status

    • info

      the response property became required for the status

    • info

      removed the respan enum value from the response property for the response status