Skip to main content
Cohere

Search documentation

Type to search this documentation.

Get a Model

GET/v1/models/{model}Get a Model

Returns the details of a model, provided its name.

Parameters

modelstringpathrequired
X-Client-Namestringheader

The name of the project that is making the request.

Responses

200OKapplication/json

Headers

X-API-Warning

The name of the project that is making the request.

objectGetModelResponse

Contains information about the model and which API endpoints it can be used with.

context_lengthnumber

The maximum number of tokens that the model can process in a single request. Note that not all of these tokens are always available due to special tokens and preambles that Cohere has added by default.

default_endpointsarray of string

The API endpoints that the model is default to.

Show child attributes
endpointsarray of string

The API endpoints that the model is compatible with.

Show child attributes
featuresarray of string

The features that the model supports.

Show child attributes
finetunedboolean

Whether the model has been fine-tuned or not.

is_deprecatedboolean

Whether the model is deprecated or not.

namestring

Specify this name in the `model` parameter of API requests to use your chosen model.

sampling_defaultsobject

Default sampling parameters for this model when omitted from API requests.

Show child attributes
frequency_penaltynumber · float
kinteger · int32
max_tokens_per_docinteger · int32
pnumber · float
presence_penaltynumber · float
temperaturenumber · float
tokenizer_urlstring

Public URL to the tokenizer's configuration file.

Example response
{
  "context_length": 0,
  "default_endpoints": [
    "chat"
  ],
  "endpoints": [
    "chat"
  ],
  "features": [
    "string"
  ],
  "finetuned": true,
  "is_deprecated": true,
  "name": "string",
  "sampling_defaults": {
    "frequency_penalty": 0,
    "k": 0,
    "max_tokens_per_doc": 0,
    "p": 0,
    "presence_penalty": 0,
    "temperature": 0
  },
  "tokenizer_url": "string"
}
400This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
401This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
403This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
404This error is returned when a resource is not found. This could be because: - The endpoint does not exist - The resource does not exist eg model id, dataset id application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
422This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
429Too many requestsapplication/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
498This error is returned when a request or response contains a deny-listed token. application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
499This error is returned when a request is cancelled by the user. application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
500This error is returned when an uncategorised internal server error occurs. application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
501This error is returned when the requested feature is not implemented. application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
503This error is returned when the service is unavailable. This could be due to: - Too many users trying to access the service at the same time application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
504This error is returned when a request to the server times out. This could be due to: - An internal services taking too long to respond application/json
object
idstring
messagestring
Example response
{
  "id": "string",
  "message": "string"
}
Documentation menu