{"openapi":"3.1.0","info":{"title":"Cohere API","version":"1.0.0"},"paths":{"/v1/chat":{"post":{"operationId":"chat-stream","summary":"Chat API (v1)","description":"Generates a streamed text response to a user message.\n\nTo learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).\n","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}},{"name":"Accepts","in":"header","description":"Pass text/event-stream to receive the streamed response as server-sent events. The default is `\\n` delimited events.\n","required":false,"schema":{"$ref":"#/components/schemas/V1ChatPostParametersAccepts"}}],"responses":{"200":{"description":"Generates a streamed text response to a user message.\n\nTo learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).\n","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/chat_Response_stream_streaming"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Text input for the model to respond to.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"model":{"type":"string","description":"The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.\n\nCompatible Deployments: Cohere Platform, Private Deployments\n"},"stream":{"type":"boolean","enum":[true],"description":"Defaults to `false`.\n\nWhen `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `\"stream-end\"`.\n\nStreaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"preamble":{"type":"string","description":"When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.\n\nThe `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"chat_history":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.\n\nEach item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"conversation_id":{"type":"string","description":"An alternative to `chat_history`.\n\nProviding a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.\n\nCompatible Deployments: Cohere Platform\n"},"prompt_truncation":{"$ref":"#/components/schemas/V1ChatPostRequestBodyContentApplicationJsonSchemaPromptTruncation","description":"Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.\n\nDictates how the prompt will be constructed.\n\nWith `prompt_truncation` set to \"AUTO\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.\n\nWith `prompt_truncation` set to \"AUTO_PRESERVE_ORDER\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.\n\nWith `prompt_truncation` set to \"OFF\", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.\n\nCompatible Deployments:\n - AUTO: Cohere Platform Only\n - AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/ChatConnector"},"description":"Accepts `{\"id\": \"web-search\"}`, and/or the `\"id\"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n"},"search_queries_only":{"type":"boolean","description":"Defaults to `false`.\n\nWhen `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ChatDocument"},"description":"A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.\n\nExample:\n```\n[\n  { \"title\": \"Tall penguins\", \"text\": \"Emperor penguins are the tallest.\" },\n  { \"title\": \"Penguin habitats\", \"text\": \"Emperor penguins only live in Antarctica.\" },\n]\n```\n\nKeys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.\n\nSome suggested keys are \"text\", \"author\", and \"date\". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.\n\nAn `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.\n\nAn `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The \"_excludes\" field will not be passed to the model.\n\nSee ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"citation_quality":{"$ref":"#/components/schemas/V1ChatPostRequestBodyContentApplicationJsonSchemaCitationQuality","description":"Defaults to `\"enabled\"`.\nCitations are enabled by default for models that support it, but can be turned off by setting `\"type\": \"disabled\"`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"temperature":{"type":"number","format":"double","description":"Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the  value of the `p` parameter.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"max_tokens":{"type":"integer","description":"The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"max_input_tokens":{"type":"integer","description":"The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.\n\nInput will be truncated according to the `prompt_truncation` parameter.\n\nCompatible Deployments: Cohere Platform\n"},"k":{"type":"integer","default":0,"description":"Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"p":{"type":"number","format":"double","default":0.75,"description":"Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"seed":{"type":"integer","description":"If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"stop_sequences":{"type":"array","items":{"type":"string"},"description":"A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"frequency_penalty":{"type":"number","format":"double","description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"presence_penalty":{"type":"number","format":"double","description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"raw_prompting":{"type":"boolean","description":"When enabled, the user's prompt will be sent to the model without\nany pre-processing.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"A list of available tools (functions) that the model may suggest invoking before producing a text response.\n\nWhen `tools` is passed (without `tool_results`), the `text` field in the response will be `\"\"` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"tool_results":{"type":"array","items":{"$ref":"#/components/schemas/ToolResult"},"description":"A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.\nEach tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.\n\n**Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{\"status\": 200}`), make sure to wrap it in a list.\n```\ntool_results = [\n  {\n    \"call\": {\n      \"name\": <tool name>,\n      \"parameters\": {\n        <param name>: <param value>\n      }\n    },\n    \"outputs\": [{\n      <key>: <value>\n    }]\n  },\n  ...\n]\n```\n**Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"force_single_step":{"type":"boolean","description":"Forces the chat to be single step. Defaults to `false`."},"response_format":{"$ref":"#/components/schemas/ResponseFormat"},"safety_mode":{"$ref":"#/components/schemas/V1ChatPostRequestBodyContentApplicationJsonSchemaSafetyMode","description":"Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.\nWhen `NONE` is specified, the safety instruction will be omitted.\n\nSafety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.\n\n**Note**: This parameter is only compatible newer Cohere models, starting with [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release) and [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release).\n\n**Note**: `command-r7b-12-2024` and newer models only support `\"CONTEXTUAL\"` and `\"STRICT\"` modes.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"}},"required":["message","stream"]}}}}}},"/v1/embed":{"post":{"operationId":"embed","summary":"Embed API (v1)","description":"This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.\n\nEmbeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.\n\nIf you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](https://docs.cohere.com/docs/semantic-search).","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/embed_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string"},"description":"An array of strings for the model to embed. Maximum number of texts per call is `96`."},"images":{"type":"array","items":{"type":"string"},"description":"An array of image data URIs for the model to embed.\n\nThe image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.\n\nImage embeddings are supported with Embed v3.0 and newer models.\n\nFor **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.\n\nFor **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`."},"model":{"type":"string","description":"ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed)."},"input_type":{"$ref":"#/components/schemas/EmbedInputType"},"embedding_types":{"type":"array","items":{"$ref":"#/components/schemas/EmbeddingType"},"description":"Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Supported with all Embed models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Supported with Embed v3.0 and newer Embed models."},"truncate":{"$ref":"#/components/schemas/V1EmbedPostRequestBodyContentApplicationJsonSchemaTruncate","default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned."}}}}}}}},"/v1/embed-jobs":{"post":{"operationId":"create","summary":"Create an Embed Job","description":"This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings.","tags":["subpackage_embedJobs"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedJobResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-embed-jobRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedJobRequest"}}}}},"get":{"operationId":"list","summary":"List Embed Jobs","description":"The list embed job endpoint allows users to view all embed jobs history for that specific user.","tags":["subpackage_embedJobs"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmbedJobResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-embed-jobsRequestGatewayTimeoutError"}}}}}}},"/v1/embed-jobs/{id}":{"get":{"operationId":"get","summary":"Fetch an Embed Job","description":"This API retrieves the details about an embed job started by the same user.","tags":["subpackage_embedJobs"],"parameters":[{"name":"id","in":"path","description":"The ID of the embed job to retrieve.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedJob"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-embed-jobRequestGatewayTimeoutError"}}}}}}},"/v1/embed-jobs/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel an Embed Job","description":"This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation.","tags":["subpackage_embedJobs"],"parameters":[{"name":"id","in":"path","description":"The ID of the embed job to cancel.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/embed-jobs_cancel_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel-embed-jobRequestGatewayTimeoutError"}}}}}}},"/v1/rerank":{"post":{"operationId":"rerank","summary":"Rerank API (v1)","description":"This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rerank_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"The identifier of the model to use, eg `rerank-v3.5`."},"query":{"type":"string","description":"The search query"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/V1RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems"},"description":"A list of document objects or strings to rerank.\nIf a document is provided the text fields is required and all other fields will be preserved in the response.\n\nThe total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.\n\nWe recommend a maximum of 1,000 documents for optimal endpoint performance."},"top_n":{"type":"integer","description":"The number of most relevant documents or indices to return, defaults to the length of the documents"},"rank_fields":{"type":"array","items":{"type":"string"},"description":"If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text  sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking."},"return_documents":{"type":"boolean","default":false,"description":"- If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.\n- If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request."},"max_chunks_per_doc":{"type":"integer","default":10,"description":"The maximum number of chunks to produce internally from a document"}},"required":["query","documents"]}}}}}},"/v1/datasets":{"post":{"operationId":"create","summary":"Create a Dataset","description":"Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information.","tags":["subpackage_datasets"],"parameters":[{"name":"name","in":"query","description":"The name of the uploaded dataset.","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"The dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.","required":true,"schema":{"$ref":"#/components/schemas/DatasetType"}},{"name":"keep_original_file","in":"query","description":"Indicates if the original file should be stored.","required":false,"schema":{"type":"boolean"}},{"name":"skip_malformed_input","in":"query","description":"Indicates whether rows with malformed input should be dropped (instead of failing the validation check). Dropped rows will be returned in the warnings field.","required":false,"schema":{"type":"boolean"}},{"name":"keep_fields","in":"query","description":"List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `keep_fields` are missing from the uploaded file, Dataset validation will fail.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"optional_fields","in":"query","description":"List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, Datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `optional_fields` are missing from the uploaded file, Dataset validation will pass.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"text_separator","in":"query","description":"Raw .txt uploads will be split into entries using the text_separator value.","required":false,"schema":{"type":"string"}},{"name":"csv_delimiter","in":"query","description":"The delimiter used for .csv uploads.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_create_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-datasetRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"data":{"type":"string","format":"binary","description":"The file to upload"},"eval_data":{"type":"string","format":"binary","description":"An optional evaluation file to upload"}},"required":["data"]}}}}},"get":{"operationId":"list","summary":"List Datasets","description":"List datasets that have been created.","tags":["subpackage_datasets"],"parameters":[{"name":"datasetType","in":"query","description":"optional filter by dataset type","required":false,"schema":{"type":"string"}},{"name":"before","in":"query","description":"optional filter before a date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"after","in":"query","description":"optional filter after a date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"optional limit to number of results","required":false,"schema":{"type":"number","format":"double"}},{"name":"offset","in":"query","description":"optional offset to start of results","required":false,"schema":{"type":"number","format":"double"}},{"name":"validationStatus","in":"query","description":"optional filter by validation status","required":false,"schema":{"$ref":"#/components/schemas/DatasetValidationStatus"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_list_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-datasetsRequestGatewayTimeoutError"}}}}}}},"/v1/datasets/usage":{"get":{"operationId":"get-usage","summary":"Get Dataset Usage","description":"View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users.","tags":["subpackage_datasets"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_getUsage_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-dataset-usageRequestGatewayTimeoutError"}}}}}}},"/v1/datasets/{id}":{"get":{"operationId":"get","summary":"Get a Dataset","description":"Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information.","tags":["subpackage_datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_get_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-datasetRequestGatewayTimeoutError"}}}}}},"delete":{"operationId":"delete","summary":"Delete a Dataset","description":"Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.","tags":["subpackage_datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_delete_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-datasetRequestGatewayTimeoutError"}}}}}}},"/v1/tokenize":{"post":{"operationId":"tokenize","summary":"Tokenize","description":"This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenize_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizeRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters."},"model":{"type":"string","description":"The input will be tokenized by the tokenizer that is used by this model."}},"required":["text","model"]}}}}}},"/v1/detokenize":{"post":{"operationId":"detokenize","summary":"Detokenize","description":"This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/detokenize_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetokenizeRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"type":"integer"},"description":"The list of tokens to be detokenized."},"model":{"type":"string","description":"An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model."}},"required":["tokens","model"]}}}}}},"/v1/models/{model}":{"get":{"operationId":"get","summary":"Get a Model","description":"Returns the details of a model, provided its name.","tags":["subpackage_models"],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModelResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-modelRequestGatewayTimeoutError"}}}}}}},"/v1/models":{"get":{"operationId":"list","summary":"List Models","description":"Returns a list of models available for use.","tags":["subpackage_models"],"parameters":[{"name":"page_size","in":"query","description":"Maximum number of models to include in a page\nDefaults to `20`, min value of `1`, max value of `1000`.","required":false,"schema":{"type":"number","format":"double"}},{"name":"page_token","in":"query","description":"Page token provided in the `next_page_token` field of a previous response.","required":false,"schema":{"type":"string"}},{"name":"endpoint","in":"query","description":"When provided, filters the list of models to only those that are compatible with the specified endpoint.","required":false,"schema":{"$ref":"#/components/schemas/CompatibleEndpoint"}},{"name":"default_only","in":"query","description":"When provided, filters the list of models to only the default model to the endpoint. This parameter is only valid when `endpoint` is provided.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListModelsResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-modelsRequestGatewayTimeoutError"}}}}}}},"/v1/classify":{"post":{"operationId":"classify","summary":"Classify","description":"This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.\nNote: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/classify_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"description":"A list of up to 96 texts to be classified. Each one must be a non-empty string.\nThere is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the \"max tokens\" column [here](https://docs.cohere.com/docs/models).\nNote: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts."},"examples":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyExample"},"description":"An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: \"...\",label: \"...\"}`.\nNote: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly."},"model":{"type":"string","description":"ID of a [Fine-tuned](https://docs.cohere.com/v2/docs/classify-starting-the-training) Classify model"},"preset":{"type":"string","description":"The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters."},"truncate":{"$ref":"#/components/schemas/V1ClassifyPostRequestBodyContentApplicationJsonSchemaTruncate","default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned."}},"required":["inputs"]}}}}}},"/v1/connectors":{"get":{"operationId":"list","summary":"List Connectors","description":"Returns a list of connectors ordered by descending creation date (newer first). See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"limit","in":"query","description":"Maximum number of connectors to return [0, 100].","required":false,"schema":{"type":"number","format":"double","default":30}},{"name":"offset","in":"query","description":"Number of connectors to skip before returning results [0, inf].","required":false,"schema":{"type":"number","format":"double","default":0}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConnectorsResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List-connectorsRequestGatewayTimeoutError"}}}}}},"post":{"operationId":"create","summary":"Create a Connector","description":"Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectorResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-connectorRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectorRequest"}}}}}},"/v1/connectors/{id}":{"get":{"operationId":"get","summary":"Get a Connector","description":"Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to retrieve.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConnectorResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-connectorRequestGatewayTimeoutError"}}}}}},"patch":{"operationId":"update","summary":"Update a Connector","description":"Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to update.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectorResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update-connectorRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectorRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete a Connector","description":"Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to delete.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConnectorResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delete-connectorRequestGatewayTimeoutError"}}}}}}},"/v1/connectors/{id}/oauth/authorize":{"post":{"operationId":"o-auth-authorize","summary":"Authorize with oAuth","description":"Authorize the connector with the given ID for the connector oauth app.  See ['Connector Authentication'](https://docs.cohere.com/docs/connector-authentication) for more information.","tags":["subpackage_connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to authorize.","required":true,"schema":{"type":"string"}},{"name":"after_token_redirect","in":"query","description":"The URL to redirect to after the connector has been authorized.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizeResponse"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorize-connectorRequestGatewayTimeoutError"}}}}}}},"/v1/finetuning/finetuned-models":{"get":{"operationId":"list-finetuned-models","summary":"Lists fine-tuned models.","description":"Returns a list of fine-tuned models that the user has access to.","tags":["subpackage_finetuning"],"parameters":[{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","required":false,"schema":{"type":"integer"}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","required":false,"schema":{"type":"string"}},{"name":"order_by","in":"query","description":"Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n  - created_at (default)","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFinetunedModelsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create-finetuned-model","summary":"Trains and deploys a fine-tuned model.","description":"Creates a new fine-tuned model. The model will be trained on the dataset specified in the request body. The training process may take some time, and the model will be available once the training is complete.","tags":["subpackage_finetuning"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFinetunedModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"description":"Information about the fine-tuned model. Must contain name and settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunedModel"}}}}}},"/v1/finetuning/finetuned-models/{id}":{"patch":{"operationId":"update-finetuned-model","summary":"Updates a fine-tuned model.","description":"Updates the fine-tuned model with the given ID. The model will be updated with the new settings and name provided in the request body.","tags":["subpackage_finetuning"],"parameters":[{"name":"id","in":"path","description":"FinetunedModel ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFinetunedModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"description":"Information about the fine-tuned model. Must contain name and settings.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"FinetunedModel name (e.g. `foobar`)."},"creator_id":{"type":"string","description":"User ID of the creator."},"organization_id":{"type":"string","description":"Organization ID."},"settings":{"$ref":"#/components/schemas/Settings","description":"FinetunedModel settings such as dataset, hyperparameters..."},"status":{"$ref":"#/components/schemas/Status","default":"STATUS_UNSPECIFIED","description":"Current stage in the life-cycle of the fine-tuned model."},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Latest update timestamp."},"completed_at":{"type":"string","format":"date-time","description":"Timestamp for the completed fine-tuning."},"last_used":{"type":"string","format":"date-time","description":"Deprecated: Timestamp for the latest request to this fine-tuned model."}},"required":["name","settings"]}}}}},"get":{"operationId":"get-finetuned-model","summary":"Returns a fine-tuned model by ID.","description":"Retrieve a fine-tuned model by its ID.","tags":["subpackage_finetuning"],"parameters":[{"name":"id","in":"path","description":"The fine-tuned model ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFinetunedModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete-finetuned-model","summary":"Deletes a fine-tuned model.","description":"Deletes a fine-tuned model. The model will be removed from the system and will no longer be available for use.\nThis operation is irreversible.","tags":["subpackage_finetuning"],"parameters":[{"name":"id","in":"path","description":"The fine-tuned model ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFinetunedModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/events":{"get":{"operationId":"list-events","summary":"Fetch history of statuses for a fine-tuned model.","description":"Returns a list of events that occurred during the life-cycle of the fine-tuned model.\nThe events are ordered by creation time, with the most recent event first.\nThe list can be paginated using `page_size` and `page_token` parameters.","tags":["subpackage_finetuning"],"parameters":[{"name":"finetuned_model_id","in":"path","description":"The parent fine-tuned model ID.","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","required":false,"schema":{"type":"integer"}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","required":false,"schema":{"type":"string"}},{"name":"order_by","in":"query","description":"Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n  - created_at (default)","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEventsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics":{"get":{"operationId":"list-training-step-metrics","summary":"Retrieve training metrics for fine-tuned models.","description":"Returns a list of metrics measured during the training of a fine-tuned model.\nThe metrics are ordered by step number, with the most recent step first.\nThe list can be paginated using `page_size` and `page_token` parameters.","tags":["subpackage_finetuning"],"parameters":[{"name":"finetuned_model_id","in":"path","description":"The parent fine-tuned model ID.","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","required":false,"schema":{"type":"integer"}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTrainingStepMetricsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generate":{"post":{"operationId":"generate-stream","summary":"Generate","description":"<Warning>\nThis API is marked as \"Legacy\" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat with Streaming API.\n</Warning>\nGenerates realistic text conditioned on a given input.\n","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"<Warning>\nThis API is marked as \"Legacy\" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat with Streaming API.\n</Warning>\nGenerates realistic text conditioned on a given input.\n","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/generate_Response_stream_streaming"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"The input text that serves as the starting point for generating the response.\nNote: The prompt will be pre-processed and modified before reaching the model.\n"},"model":{"type":"string","description":"The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).\nSmaller, \"light\" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID."},"num_generations":{"type":"integer","description":"The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`.\n"},"stream":{"type":"boolean","enum":[true],"description":"When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n\nThe final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:\n- `COMPLETE` - the model sent back a finished reply\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n"},"max_tokens":{"type":"integer","description":"The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.\n\nThis parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.\n\nCan only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt.\n"},"truncate":{"$ref":"#/components/schemas/V1GeneratePostRequestBodyContentApplicationJsonSchemaTruncate","default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned."},"temperature":{"type":"number","format":"double","description":"A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.\nDefaults to `0.75`, min value of `0.0`, max value of `5.0`.\n"},"seed":{"type":"integer","description":"If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"},"preset":{"type":"string","description":"Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).\nWhen a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.\n"},"end_sequences":{"type":"array","items":{"type":"string"},"description":"The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text."},"stop_sequences":{"type":"array","items":{"type":"string"},"description":"The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text."},"k":{"type":"integer","description":"Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n"},"p":{"type":"number","format":"double","description":"Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n"},"frequency_penalty":{"type":"number","format":"double","description":"Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n"},"presence_penalty":{"type":"number","format":"double","description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nCan be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n"},"return_likelihoods":{"$ref":"#/components/schemas/V1GeneratePostRequestBodyContentApplicationJsonSchemaReturnLikelihoods","default":"NONE","description":"One of `GENERATION|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.\n\nIf `GENERATION` is selected, the token likelihoods will only be provided for generated text.\n\nWARNING: `ALL` is deprecated, and will be removed in a future release."},"raw_prompting":{"type":"boolean","description":"When enabled, the user's prompt will be sent to the model without any pre-processing."}},"required":["prompt","stream"]}}}}}},"/v1/summarize":{"post":{"operationId":"summarize","summary":"Summarize","description":"<Warning>\nThis API is marked as \"Legacy\" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.\n</Warning>\nGenerates a summary in English for a given text.\n","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/summarize_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequestGatewayTimeoutError"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English."},"length":{"$ref":"#/components/schemas/V1SummarizePostRequestBodyContentApplicationJsonSchemaLength","default":"medium","description":"One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text."},"format":{"$ref":"#/components/schemas/V1SummarizePostRequestBodyContentApplicationJsonSchemaFormat","default":"paragraph","description":"One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text."},"model":{"type":"string","description":"The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, \"light\" models are faster, while larger models will perform better."},"extractiveness":{"$ref":"#/components/schemas/V1SummarizePostRequestBodyContentApplicationJsonSchemaExtractiveness","default":"low","description":"One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text."},"temperature":{"type":"number","format":"double","default":0.3,"description":"Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1."},"additional_command":{"type":"string","description":"A free-form instruction for modifying how the summaries get generated. Should complete the sentence \"Generate a summary _\". Eg. \"focusing on the next steps\" or \"written by Yoda\""}},"required":["text"]}}}}}},"/v1/check-api-key":{"post":{"operationId":"check-api-key","summary":"Check API key","description":"Checks that the api key in the Authorization header is valid and active\n","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkAPIKey_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAPIKeyRequestGatewayTimeoutError"}}}}}}},"/v2/audio/transcriptions":{"post":{"operationId":"create","summary":"Create a transcription","description":"Transcribe an audio file.","tags":["subpackage_audio.subpackage_audio/transcriptions"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audio_transcriptions_create_Response_200"}}}},"400":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestBadRequestError"}}}},"401":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestUnauthorizedError"}}}},"403":{"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestForbiddenError"}}}},"404":{"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestNotFoundError"}}}},"422":{"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestUnprocessableEntityError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestTooManyRequestsError"}}}},"498":{"description":"This error is returned when a request or response contains a deny-listed token.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestInvalidTokenError"}}}},"499":{"description":"This error is returned when a request is cancelled by the user.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestClientClosedRequestError"}}}},"500":{"description":"This error is returned when an uncategorised internal server error occurs.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestInternalServerError"}}}},"501":{"description":"This error is returned when the requested feature is not implemented.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestNotImplementedError"}}}},"503":{"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestServiceUnavailableError"}}}},"504":{"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create-transcriptionRequestGatewayTimeoutError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use."},"language":{"type":"string","description":"The language of the input audio, supplied in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format."},"temperature":{"type":"number","format":"double","description":"The sampling temperature, between 0 and 1. Higher values like 0.8 make the output more random, while lower values like 0.2 make it more focused and deterministic."},"file":{"type":"string","format":"binary","description":"The audio file object to transcribe. Supported file extensions are flac, mp3, mpeg, mpga, ogg, and wav."}},"required":["model","language","file"]}}}}}},"/v2/batches":{"get":{"operationId":"list","summary":"List batches","description":"List the batches for the current user","tags":["subpackage_batches"],"parameters":[{"name":"page_size","in":"query","description":"The maximum number of batches to return. The service may return fewer than\nthis value.\nIf unspecified, at most 50 batches will be returned.\nThe maximum value is 1000; values above 1000 will be coerced to 1000.","required":false,"schema":{"type":"integer"}},{"name":"page_token","in":"query","description":"A page token, received from a previous `ListBatches` call.\nProvide this to retrieve the subsequent page.","required":false,"schema":{"type":"string"}},{"name":"order_by","in":"query","description":"Batches can be ordered by creation time or last updated time.\nUse `created_at` for creation time or `updated_at` for last updated time.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBatchesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}}}},"post":{"operationId":"create","summary":"Create a batch","description":"Creates and executes a batch from an uploaded dataset of requests","tags":["subpackage_batches"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}}},"requestBody":{"description":"Information about the batch. Must contain name, input_dataset_id, and\nmodel. Output-only fields are ignored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}}}},"/v2/batches/{id}":{"get":{"operationId":"retrieve","summary":"Retrieve a batch","description":"Retrieves a batch","tags":["subpackage_batches"],"parameters":[{"name":"id","in":"path","description":"The batch ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBatchResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}}}}},"/v2/batches/{id}:cancel":{"post":{"operationId":"cancel","summary":"Cancel a batch","description":"Cancels an in-progress batch","tags":["subpackage_batches"],"parameters":[{"name":"id","in":"path","description":"The batch ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"X-Client-Name","in":"header","description":"The name of the project that is making the request.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBatchResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}},"503":{"description":"Status Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}}}}}}},"servers":[{"url":"https://api.cohere.com"}],"components":{"schemas":{"V1ChatPostParametersAccepts":{"type":"string","enum":["text/event-stream"],"title":"V1ChatPostParametersAccepts"},"ToolCall":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tool to call."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The name and value of the parameters to use when invoking a tool."}},"required":["name","parameters"],"description":"Contains the tool calls generated by the model. Use it to invoke your tools.\n","title":"ToolCall"},"ToolResult":{"type":"object","properties":{"call":{"$ref":"#/components/schemas/ToolCall"},"outputs":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"required":["call","outputs"],"title":"ToolResult"},"Message":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["CHATBOT"],"description":"Discriminator value: CHATBOT"},"message":{"type":"string","description":"Contents of the chat message.\n"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["role","message"],"description":"Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\n"},{"type":"object","properties":{"role":{"type":"string","enum":["SYSTEM"],"description":"Discriminator value: SYSTEM"},"message":{"type":"string","description":"Contents of the chat message.\n"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["role","message"],"description":"Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\n"},{"type":"object","properties":{"role":{"type":"string","enum":["USER"],"description":"Discriminator value: USER"},"message":{"type":"string","description":"Contents of the chat message.\n"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["role","message"],"description":"Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\n"},{"type":"object","properties":{"role":{"type":"string","enum":["TOOL"],"description":"Discriminator value: TOOL"},"tool_results":{"type":"array","items":{"$ref":"#/components/schemas/ToolResult"}}},"required":["role"],"description":"Represents tool result in the chat history.\n"}],"discriminator":{"propertyName":"role"},"title":"Message"},"V1ChatPostRequestBodyContentApplicationJsonSchemaPromptTruncation":{"type":"string","enum":["OFF","AUTO","AUTO_PRESERVE_ORDER"],"description":"Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.\n\nDictates how the prompt will be constructed.\n\nWith `prompt_truncation` set to \"AUTO\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.\n\nWith `prompt_truncation` set to \"AUTO_PRESERVE_ORDER\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.\n\nWith `prompt_truncation` set to \"OFF\", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.\n\nCompatible Deployments:\n - AUTO: Cohere Platform Only\n - AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments\n","title":"V1ChatPostRequestBodyContentApplicationJsonSchemaPromptTruncation"},"ChatConnector-7ur0eu":{"type":"object","properties":{},"description":"Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.\n\nFor example, the connector `web-search` supports the `site` option, which limits search results to the specified domain.\n","title":"ChatConnector-7ur0eu"},"ChatConnector":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the connector.\n"},"user_access_token":{"type":"string","description":"When specified, this user access token will be passed to the connector in the Authorization header instead of the Cohere generated one.\n"},"continue_on_failure":{"type":"boolean","description":"Defaults to `false`.\n\nWhen `true`, the request will continue if this connector returned an error.\n"},"options":{"$ref":"#/components/schemas/ChatConnector-7ur0eu","description":"Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.\n\nFor example, the connector `web-search` supports the `site` option, which limits search results to the specified domain.\n"}},"required":["id"],"description":"The connector used for fetching documents.\n","title":"ChatConnector"},"ChatDocument":{"type":"object","additionalProperties":{"type":"string"},"description":"Relevant information that could be used by the model to generate a more accurate reply.\nThe contents of each document are generally short (under 300 words), and are passed in the form of a\ndictionary of strings. Some suggested keys are \"text\", \"author\", \"date\". Both the key name and the value will be\npassed to the model.\n","title":"ChatDocument"},"V1ChatPostRequestBodyContentApplicationJsonSchemaCitationQuality":{"type":"string","enum":["ENABLED","DISABLED","FAST","ACCURATE","OFF"],"description":"Defaults to `\"enabled\"`.\nCitations are enabled by default for models that support it, but can be turned off by setting `\"type\": \"disabled\"`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","title":"V1ChatPostRequestBodyContentApplicationJsonSchemaCitationQuality"},"ToolParameterDefinitions":{"type":"object","properties":{"description":{"type":"string","description":"The description of the parameter.\n"},"type":{"type":"string","description":"The type of the parameter. Must be a valid Python type.\n"},"required":{"type":"boolean","default":false,"description":"Denotes whether the parameter is always present (required) or not. Defaults to not required.\n"}},"required":["type"],"title":"ToolParameterDefinitions"},"Tool":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tool to be called. Valid names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.\n"},"description":{"type":"string","description":"The description of what the tool does, the model uses the description to choose when and how to call the function.\n"},"parameter_definitions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ToolParameterDefinitions"},"description":"The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.\n```\n{\n  \"my_param\": {\n    \"description\": <string>,\n    \"type\": <string>, // any python data type, such as 'str', 'bool'\n    \"required\": <boolean>\n  }\n}\n```\n"}},"required":["name","description"],"title":"Tool"},"JSONResponseFormat-g7xopi":{"type":"object","properties":{},"description":"A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](https://docs.cohere.com/docs/structured-outputs-json#schema-constraints) for more information.\nExample (required name and age object):\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\"type\": \"string\"},\n    \"age\": {\"type\": \"integer\"}\n  },\n  \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n","title":"JSONResponseFormat-g7xopi"},"ResponseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"}},"required":["type"],"description":"Text Response variant"},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"],"description":"Discriminator value: json_object"},"schema":{"$ref":"#/components/schemas/JSONResponseFormat-g7xopi","description":"A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](https://docs.cohere.com/docs/structured-outputs-json#schema-constraints) for more information.\nExample (required name and age object):\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\"type\": \"string\"},\n    \"age\": {\"type\": \"integer\"}\n  },\n  \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n"}},"required":["type"],"description":"JSON Object Response variant"}],"discriminator":{"propertyName":"type"},"description":"Configuration for forcing the model output to adhere to the specified format. Supported on [Command R 03-2024](https://docs.cohere.com/docs/command-r), [Command R+ 04-2024](https://docs.cohere.com/docs/command-r-plus) and newer models.\n\nThe model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ \"type\": \"json_object\" }`.\n\nA [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.\n\n**Note**: When using  `{ \"type\": \"json_object\" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _\"Generate a JSON ...\"_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.\n**Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided).\n","title":"ResponseFormat"},"V1ChatPostRequestBodyContentApplicationJsonSchemaSafetyMode":{"type":"string","enum":["CONTEXTUAL","STRICT","NONE"],"description":"Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.\nWhen `NONE` is specified, the safety instruction will be omitted.\n\nSafety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.\n\n**Note**: This parameter is only compatible newer Cohere models, starting with [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release) and [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release).\n\n**Note**: `command-r7b-12-2024` and newer models only support `\"CONTEXTUAL\"` and `\"STRICT\"` modes.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","title":"V1ChatPostRequestBodyContentApplicationJsonSchemaSafetyMode"},"ChatCitationType":{"type":"string","enum":["TEXT_CONTENT","PLAN"],"description":"The type of citation which indicates what part of the response the citation is for.\n","title":"ChatCitationType"},"ChatCitation":{"type":"object","properties":{"start":{"type":"integer","description":"The index of text that the citation starts at, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have a start value of `7`. This is because the citation starts at `w`, which is the seventh character.\n"},"end":{"type":"integer","description":"The index of text that the citation ends after, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have an end value of `11`. This is because the citation ends after `d`, which is the eleventh character.\n"},"text":{"type":"string","description":"The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`.\n"},"document_ids":{"type":"array","items":{"type":"string"},"description":"Identifiers of documents cited by this section of the generated reply.\n"},"type":{"$ref":"#/components/schemas/ChatCitationType","description":"The type of citation which indicates what part of the response the citation is for.\n"}},"required":["start","end","text","document_ids"],"description":"A section of the generated reply which cites external knowledge.\n","title":"ChatCitation"},"ChatSearchQuery":{"type":"object","properties":{"text":{"type":"string","description":"The text of the search query.\n"},"generation_id":{"type":"string","format":"uuid","description":"Unique identifier for the generated search query. Useful for submitting feedback.\n"}},"required":["text","generation_id"],"description":"The generated search query. Contains the text of the query and a unique identifier for the query.\n","title":"ChatSearchQuery"},"ChatSearchResult":{"type":"object","properties":{"search_query":{"$ref":"#/components/schemas/ChatSearchQuery"},"connector":{"description":"The connector from which this result comes from.\n"},"document_ids":{"type":"array","items":{"type":"string"},"description":"Identifiers of documents found by this search query.\n"},"error_message":{"type":"string","description":"An error message if the search failed.\n"},"continue_on_failure":{"type":"boolean","description":"Whether a chat request should continue or not if the request to this connector fails.\n"}},"required":["connector","document_ids"],"title":"ChatSearchResult"},"FinishReason":{"type":"string","enum":["COMPLETE","STOP_SEQUENCE","ERROR","ERROR_TOXIC","ERROR_LIMIT","USER_CANCEL","MAX_TOKENS","TIMEOUT"],"title":"FinishReason"},"ApiMetaApiVersion":{"type":"object","properties":{"version":{"type":"string"},"is_deprecated":{"type":"boolean"},"is_experimental":{"type":"boolean"}},"required":["version"],"title":"ApiMetaApiVersion"},"ApiMetaBilledUnits":{"type":"object","properties":{"images":{"type":"number","format":"double","description":"The number of billed images.\n"},"input_tokens":{"type":"number","format":"double","description":"The number of billed input tokens.\n"},"image_tokens":{"type":"number","format":"double","description":"The number of billed image tokens.\n"},"output_tokens":{"type":"number","format":"double","description":"The number of billed output tokens.\n"},"search_units":{"type":"number","format":"double","description":"The number of billed search units.\n"},"classifications":{"type":"number","format":"double","description":"The number of billed classifications units.\n"}},"title":"ApiMetaBilledUnits"},"ApiMetaTokens":{"type":"object","properties":{"input_tokens":{"type":"number","format":"double","description":"The number of tokens used as input to the model.\n"},"output_tokens":{"type":"number","format":"double","description":"The number of tokens produced by the model.\n"}},"title":"ApiMetaTokens"},"ApiMeta":{"type":"object","properties":{"api_version":{"$ref":"#/components/schemas/ApiMetaApiVersion"},"billed_units":{"$ref":"#/components/schemas/ApiMetaBilledUnits"},"tokens":{"$ref":"#/components/schemas/ApiMetaTokens"},"cached_tokens":{"type":"number","format":"double","description":"The number of prompt tokens that hit the inference cache.\n"},"warnings":{"type":"array","items":{"type":"string"}}},"title":"ApiMeta"},"chat_Response_stream":{"type":"object","properties":{"text":{"type":"string","description":"Contents of the reply generated by the model."},"generation_id":{"type":"string","format":"uuid","description":"Unique identifier for the generated reply. Useful for submitting feedback."},"response_id":{"type":"string","format":"uuid","description":"Unique identifier for the response."},"citations":{"type":"array","items":{"$ref":"#/components/schemas/ChatCitation"},"description":"Inline citations for the generated reply."},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ChatDocument"},"description":"Documents seen by the model when generating the reply."},"is_search_required":{"type":"boolean","description":"Denotes that a search for documents is required during the RAG flow."},"search_queries":{"type":"array","items":{"$ref":"#/components/schemas/ChatSearchQuery"},"description":"Generated search queries, meant to be used as part of the RAG flow."},"search_results":{"type":"array","items":{"$ref":"#/components/schemas/ChatSearchResult"},"description":"Documents retrieved from each of the conducted searches."},"finish_reason":{"$ref":"#/components/schemas/FinishReason"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}},"chat_history":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`.\n"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["text"],"title":"chat_Response_stream"},"ChatRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestBadRequestError"},"ChatRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestUnauthorizedError"},"ChatRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestForbiddenError"},"ChatRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestNotFoundError"},"ChatRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestUnprocessableEntityError"},"ChatRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestTooManyRequestsError"},"ChatRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestInvalidTokenError"},"ChatRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestClientClosedRequestError"},"ChatRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestInternalServerError"},"ChatRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestNotImplementedError"},"ChatRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestServiceUnavailableError"},"ChatRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ChatRequestGatewayTimeoutError"},"ChatStreamEndEventFinishReason":{"type":"string","enum":["COMPLETE","ERROR_LIMIT","MAX_TOKENS","ERROR","ERROR_TOXIC"],"description":"- `COMPLETE` - the model sent back a finished reply\n- `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n","title":"ChatStreamEndEventFinishReason"},"chat_Response_stream_streaming":{"oneOf":[{"type":"object","properties":{"event_type":{"type":"string","enum":["stream-start"],"description":"Discriminator value: stream-start"},"generation_id":{"type":"string","format":"uuid","description":"Unique identifier for the generated reply. Useful for submitting feedback.\n"}},"required":["event_type","generation_id"],"description":"stream-start variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["search-queries-generation"],"description":"Discriminator value: search-queries-generation"},"search_queries":{"type":"array","items":{"$ref":"#/components/schemas/ChatSearchQuery"},"description":"Generated search queries, meant to be used as part of the RAG flow."}},"required":["event_type","search_queries"],"description":"search-queries-generation variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["search-results"],"description":"Discriminator value: search-results"},"search_results":{"type":"array","items":{"$ref":"#/components/schemas/ChatSearchResult"},"description":"Conducted searches and the ids of documents retrieved from each of them.\n"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ChatDocument"},"description":"Documents fetched from searches or provided by the user.\n"}},"required":["event_type"],"description":"search-results variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["text-generation"],"description":"Discriminator value: text-generation"},"text":{"type":"string","description":"The next batch of text generated by the model.\n"}},"required":["event_type","text"],"description":"text-generation variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["citation-generation"],"description":"Discriminator value: citation-generation"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/ChatCitation"},"description":"Citations for the generated reply.\n"}},"required":["event_type","citations"],"description":"citation-generation variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["tool-calls-generation"],"description":"Discriminator value: tool-calls-generation"},"text":{"type":"string","description":"The text generated related to the tool calls generated\n"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["event_type","tool_calls"],"description":"tool-calls-generation variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["stream-end"],"description":"Discriminator value: stream-end"},"finish_reason":{"$ref":"#/components/schemas/ChatStreamEndEventFinishReason","description":"- `COMPLETE` - the model sent back a finished reply\n- `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n"},"response":{"description":"The consolidated response from the model. Contains the generated reply and all the other information streamed back in the previous events.\n"}},"required":["event_type","finish_reason","response"],"description":"stream-end variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["tool-calls-chunk"],"description":"Discriminator value: tool-calls-chunk"},"tool_call_delta":{"description":"Reference to ToolCallDelta"},"text":{"type":"string"}},"required":["event_type","tool_call_delta"],"description":"tool-calls-chunk variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["debug"],"description":"Discriminator value: debug"},"prompt":{"type":"string"}},"required":["event_type"],"description":"debug variant"}],"discriminator":{"propertyName":"event_type"},"description":"StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request).","title":"chat_Response_stream_streaming"},"EmbedInputType":{"type":"string","enum":["search_document","search_query","classification","clustering","image"],"description":"Specifies the type of input passed to the model. Required for embedding models v3 and higher.\n\n- `\"search_document\"`: Used for embeddings stored in a vector database for search use-cases.\n- `\"search_query\"`: Used for embeddings of search queries run against a vector DB to find relevant documents.\n- `\"classification\"`: Used for embeddings passed through a text classifier.\n- `\"clustering\"`: Used for the embeddings run through a clustering algorithm.\n- `\"image\"`: Used for embeddings with image input.\n","title":"EmbedInputType"},"EmbeddingType":{"type":"string","enum":["float","int8","uint8","binary","ubinary","base64"],"title":"EmbeddingType"},"V1EmbedPostRequestBodyContentApplicationJsonSchemaTruncate":{"type":"string","enum":["NONE","START","END"],"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","title":"V1EmbedPostRequestBodyContentApplicationJsonSchemaTruncate"},"Image":{"type":"object","properties":{"width":{"type":"integer","format":"int64","description":"Width of the image in pixels"},"height":{"type":"integer","format":"int64","description":"Height of the image in pixels"},"format":{"type":"string","description":"Format of the image"},"bit_depth":{"type":"integer","format":"int64","description":"Bit depth of the image"}},"required":["width","height","format","bit_depth"],"title":"Image"},"EmbedByTypeResponseEmbeddings":{"type":"object","properties":{"float":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}},"description":"An array of float embeddings."},"int8":{"type":"array","items":{"type":"array","items":{"type":"integer"}},"description":"An array of signed int8 embeddings. Each value is between -128 and 127."},"uint8":{"type":"array","items":{"type":"array","items":{"type":"integer"}},"description":"An array of unsigned int8 embeddings. Each value is between 0 and 255."},"binary":{"type":"array","items":{"type":"array","items":{"type":"integer"}},"description":"An array of packed signed binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between -128 and 127."},"ubinary":{"type":"array","items":{"type":"array","items":{"type":"integer"}},"description":"An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255."},"base64":{"type":"array","items":{"type":"string"},"description":"An array of base64 embeddings. Each string is the result of appending the float embedding bytes together and base64 encoding that."}},"description":"An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array.","title":"EmbedByTypeResponseEmbeddings"},"embed_Response_200":{"oneOf":[{"type":"object","properties":{"response_type":{"type":"string","enum":["embeddings_floats"],"description":"Discriminator value: embeddings_floats"},"id":{"type":"string"},"embeddings":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}},"description":"An array of embeddings, where each embedding is an array of floats. The length of the `embeddings` array will be the same as the length of the original `texts` array."},"texts":{"type":"array","items":{"type":"string"},"description":"The text entries for which embeddings were returned."},"images":{"type":"array","items":{"$ref":"#/components/schemas/Image"},"description":"The image entries for which embeddings were returned."},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["response_type","id","embeddings","texts"],"description":"embeddings_floats variant"},{"type":"object","properties":{"response_type":{"type":"string","enum":["embeddings_by_type"],"description":"Discriminator value: embeddings_by_type"},"id":{"type":"string"},"embeddings":{"$ref":"#/components/schemas/EmbedByTypeResponseEmbeddings","description":"An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array."},"texts":{"type":"array","items":{"type":"string"},"description":"The text entries for which embeddings were returned."},"images":{"type":"array","items":{"$ref":"#/components/schemas/Image"},"description":"The image entries for which embeddings were returned."},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["response_type","id","embeddings"],"description":"embeddings_by_type variant"}],"discriminator":{"propertyName":"response_type"},"title":"embed_Response_200"},"EmbedRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestBadRequestError"},"EmbedRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestUnauthorizedError"},"EmbedRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestForbiddenError"},"EmbedRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestNotFoundError"},"EmbedRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestUnprocessableEntityError"},"EmbedRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestTooManyRequestsError"},"EmbedRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestInvalidTokenError"},"EmbedRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestClientClosedRequestError"},"EmbedRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestInternalServerError"},"EmbedRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestNotImplementedError"},"EmbedRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestServiceUnavailableError"},"EmbedRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"EmbedRequestGatewayTimeoutError"},"CreateEmbedJobRequestTruncate":{"type":"string","enum":["START","END"],"default":"END","description":"One of `START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n","title":"CreateEmbedJobRequestTruncate"},"CreateEmbedJobRequest":{"type":"object","properties":{"model":{"type":"string","format":"string","description":"ID of the embedding model.\n\nAvailable models and corresponding embedding dimensions:\n\n- `embed-english-v3.0` : 1024\n- `embed-multilingual-v3.0` : 1024\n- `embed-english-light-v3.0` : 384\n- `embed-multilingual-light-v3.0` : 384\n"},"dataset_id":{"type":"string","description":"ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated`"},"input_type":{"$ref":"#/components/schemas/EmbedInputType"},"name":{"type":"string","description":"The name of the embed job."},"embedding_types":{"type":"array","items":{"$ref":"#/components/schemas/EmbeddingType"},"description":"Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Valid for all models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Valid for v3 and newer model versions.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Valid for v3 and newer model versions.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Valid for v3 and newer model versions.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Valid for v3 and newer model versions."},"truncate":{"$ref":"#/components/schemas/CreateEmbedJobRequestTruncate","default":"END","description":"One of `START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n"}},"required":["model","dataset_id","input_type"],"title":"CreateEmbedJobRequest"},"CreateEmbedJobResponse":{"type":"object","properties":{"job_id":{"type":"string"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["job_id"],"description":"Response from creating an embed job.","title":"CreateEmbedJobResponse"},"Create-embed-jobRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestBadRequestError"},"Create-embed-jobRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestUnauthorizedError"},"Create-embed-jobRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestForbiddenError"},"Create-embed-jobRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestNotFoundError"},"Create-embed-jobRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestUnprocessableEntityError"},"Create-embed-jobRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestTooManyRequestsError"},"Create-embed-jobRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestInvalidTokenError"},"Create-embed-jobRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestClientClosedRequestError"},"Create-embed-jobRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestInternalServerError"},"Create-embed-jobRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestNotImplementedError"},"Create-embed-jobRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestServiceUnavailableError"},"Create-embed-jobRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-embed-jobRequestGatewayTimeoutError"},"EmbedJobStatus":{"type":"string","enum":["processing","complete","cancelling","cancelled","failed"],"description":"The status of the embed job","title":"EmbedJobStatus"},"EmbedJobTruncate":{"type":"string","enum":["START","END"],"description":"The truncation option used","title":"EmbedJobTruncate"},"EmbedJob":{"type":"object","properties":{"job_id":{"type":"string","description":"ID of the embed job"},"name":{"type":"string","description":"The name of the embed job"},"status":{"$ref":"#/components/schemas/EmbedJobStatus","description":"The status of the embed job"},"created_at":{"type":"string","format":"date-time","description":"The creation date of the embed job"},"input_dataset_id":{"type":"string","description":"ID of the input dataset"},"output_dataset_id":{"type":"string","description":"ID of the resulting output dataset"},"model":{"type":"string","description":"ID of the model used to embed"},"truncate":{"$ref":"#/components/schemas/EmbedJobTruncate","description":"The truncation option used"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["job_id","status","created_at","input_dataset_id","model","truncate"],"title":"EmbedJob"},"ListEmbedJobResponse":{"type":"object","properties":{"embed_jobs":{"type":"array","items":{"$ref":"#/components/schemas/EmbedJob"}}},"title":"ListEmbedJobResponse"},"List-embed-jobsRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestBadRequestError"},"List-embed-jobsRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestUnauthorizedError"},"List-embed-jobsRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestForbiddenError"},"List-embed-jobsRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestNotFoundError"},"List-embed-jobsRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestUnprocessableEntityError"},"List-embed-jobsRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestTooManyRequestsError"},"List-embed-jobsRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestInvalidTokenError"},"List-embed-jobsRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestClientClosedRequestError"},"List-embed-jobsRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestInternalServerError"},"List-embed-jobsRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestNotImplementedError"},"List-embed-jobsRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestServiceUnavailableError"},"List-embed-jobsRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-embed-jobsRequestGatewayTimeoutError"},"Get-embed-jobRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestBadRequestError"},"Get-embed-jobRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestUnauthorizedError"},"Get-embed-jobRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestForbiddenError"},"Get-embed-jobRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestNotFoundError"},"Get-embed-jobRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestUnprocessableEntityError"},"Get-embed-jobRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestTooManyRequestsError"},"Get-embed-jobRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestInvalidTokenError"},"Get-embed-jobRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestClientClosedRequestError"},"Get-embed-jobRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestInternalServerError"},"Get-embed-jobRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestNotImplementedError"},"Get-embed-jobRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestServiceUnavailableError"},"Get-embed-jobRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-embed-jobRequestGatewayTimeoutError"},"embed-jobs_cancel_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"embed-jobs_cancel_Response_200"},"Cancel-embed-jobRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestBadRequestError"},"Cancel-embed-jobRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestUnauthorizedError"},"Cancel-embed-jobRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestForbiddenError"},"Cancel-embed-jobRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestNotFoundError"},"Cancel-embed-jobRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestUnprocessableEntityError"},"Cancel-embed-jobRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestTooManyRequestsError"},"Cancel-embed-jobRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestInvalidTokenError"},"Cancel-embed-jobRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestClientClosedRequestError"},"Cancel-embed-jobRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestInternalServerError"},"Cancel-embed-jobRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestNotImplementedError"},"Cancel-embed-jobRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestServiceUnavailableError"},"Cancel-embed-jobRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Cancel-embed-jobRequestGatewayTimeoutError"},"RerankDocument":{"type":"object","additionalProperties":{"type":"string"},"title":"RerankDocument"},"V1RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/RerankDocument"}],"title":"V1RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems"},"RerankResponseResultsItemDocument":{"type":"object","properties":{"text":{"type":"string","description":"The text of the document to rerank"}},"required":["text"],"description":"If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in","title":"RerankResponseResultsItemDocument"},"V1RerankPostResponsesContentApplicationJsonSchemaResultsItems":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/RerankResponseResultsItemDocument","description":"If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in"},"index":{"type":"integer","description":"Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance)"},"relevance_score":{"type":"number","format":"double","description":"Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45"}},"required":["index","relevance_score"],"title":"V1RerankPostResponsesContentApplicationJsonSchemaResultsItems"},"rerank_Response_200":{"type":"object","properties":{"id":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/V1RerankPostResponsesContentApplicationJsonSchemaResultsItems"},"description":"An ordered list of ranked documents"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["results"],"title":"rerank_Response_200"},"RerankRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestBadRequestError"},"RerankRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestUnauthorizedError"},"RerankRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestForbiddenError"},"RerankRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestNotFoundError"},"RerankRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestUnprocessableEntityError"},"RerankRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestTooManyRequestsError"},"RerankRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestInvalidTokenError"},"RerankRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestClientClosedRequestError"},"RerankRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestInternalServerError"},"RerankRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestNotImplementedError"},"RerankRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestServiceUnavailableError"},"RerankRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"RerankRequestGatewayTimeoutError"},"DatasetType":{"type":"string","enum":["embed-input","embed-result","cluster-result","cluster-outliers","reranker-finetune-input","single-label-classification-finetune-input","chat-finetune-input","multi-label-classification-finetune-input","batch-chat-input","batch-openai-chat-input","batch-embed-v2-input","batch-chat-v2-input"],"description":"The type of the dataset","title":"DatasetType"},"datasets_create_Response_200":{"type":"object","properties":{"id":{"type":"string","description":"The dataset ID"}},"title":"datasets_create_Response_200"},"Create-datasetRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestBadRequestError"},"Create-datasetRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestUnauthorizedError"},"Create-datasetRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestForbiddenError"},"Create-datasetRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestNotFoundError"},"Create-datasetRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestUnprocessableEntityError"},"Create-datasetRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestTooManyRequestsError"},"Create-datasetRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestInvalidTokenError"},"Create-datasetRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestClientClosedRequestError"},"Create-datasetRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestInternalServerError"},"Create-datasetRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestNotImplementedError"},"Create-datasetRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestServiceUnavailableError"},"Create-datasetRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-datasetRequestGatewayTimeoutError"},"DatasetValidationStatus":{"type":"string","enum":["unknown","queued","processing","failed","validated","skipped"],"description":"The validation status of the dataset","title":"DatasetValidationStatus"},"Dataset":{"type":"object","properties":{"id":{"type":"string","description":"The dataset ID"},"name":{"type":"string","description":"The name of the dataset"},"created_at":{"type":"string","format":"date-time","description":"The creation date"},"updated_at":{"type":"string","format":"date-time","description":"The last update date"},"dataset_type":{"$ref":"#/components/schemas/DatasetType"},"validation_status":{"$ref":"#/components/schemas/DatasetValidationStatus"},"validation_error":{"type":"string","description":"Errors found during validation"},"schema":{"type":"string","description":"the avro schema of the dataset"},"required_fields":{"type":"array","items":{"type":"string"}},"preserve_fields":{"type":"array","items":{"type":"string"}},"dataset_parts":{"type":"array","items":{"description":"Reference to DatasetPart"},"description":"the underlying files that make up the dataset"},"validation_warnings":{"type":"array","items":{"type":"string"},"description":"warnings found during validation"},"parse_info":{"description":"Reference to ParseInfo"},"metrics":{"description":"Reference to Metrics"}},"required":["id","name","created_at","updated_at","dataset_type","validation_status"],"title":"Dataset"},"datasets_list_Response_200":{"type":"object","properties":{"datasets":{"type":"array","items":{"$ref":"#/components/schemas/Dataset"}}},"title":"datasets_list_Response_200"},"List-datasetsRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestBadRequestError"},"List-datasetsRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestUnauthorizedError"},"List-datasetsRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestForbiddenError"},"List-datasetsRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestNotFoundError"},"List-datasetsRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestUnprocessableEntityError"},"List-datasetsRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestTooManyRequestsError"},"List-datasetsRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestInvalidTokenError"},"List-datasetsRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestClientClosedRequestError"},"List-datasetsRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestInternalServerError"},"List-datasetsRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestNotImplementedError"},"List-datasetsRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestServiceUnavailableError"},"List-datasetsRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-datasetsRequestGatewayTimeoutError"},"datasets_getUsage_Response_200":{"type":"object","properties":{"organization_usage":{"type":"integer","format":"int64","description":"The total number of bytes used by the organization."}},"title":"datasets_getUsage_Response_200"},"Get-dataset-usageRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestBadRequestError"},"Get-dataset-usageRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestUnauthorizedError"},"Get-dataset-usageRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestForbiddenError"},"Get-dataset-usageRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestNotFoundError"},"Get-dataset-usageRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestUnprocessableEntityError"},"Get-dataset-usageRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestTooManyRequestsError"},"Get-dataset-usageRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestInvalidTokenError"},"Get-dataset-usageRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestClientClosedRequestError"},"Get-dataset-usageRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestInternalServerError"},"Get-dataset-usageRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestNotImplementedError"},"Get-dataset-usageRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestServiceUnavailableError"},"Get-dataset-usageRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-dataset-usageRequestGatewayTimeoutError"},"datasets_get_Response_200":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/Dataset"}},"required":["dataset"],"title":"datasets_get_Response_200"},"Get-datasetRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestBadRequestError"},"Get-datasetRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestUnauthorizedError"},"Get-datasetRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestForbiddenError"},"Get-datasetRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestNotFoundError"},"Get-datasetRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestUnprocessableEntityError"},"Get-datasetRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestTooManyRequestsError"},"Get-datasetRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestInvalidTokenError"},"Get-datasetRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestClientClosedRequestError"},"Get-datasetRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestInternalServerError"},"Get-datasetRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestNotImplementedError"},"Get-datasetRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestServiceUnavailableError"},"Get-datasetRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-datasetRequestGatewayTimeoutError"},"datasets_delete_Response_200":{"type":"object","properties":{},"title":"datasets_delete_Response_200"},"Delete-datasetRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestBadRequestError"},"Delete-datasetRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestUnauthorizedError"},"Delete-datasetRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestForbiddenError"},"Delete-datasetRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestNotFoundError"},"Delete-datasetRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestUnprocessableEntityError"},"Delete-datasetRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestTooManyRequestsError"},"Delete-datasetRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestInvalidTokenError"},"Delete-datasetRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestClientClosedRequestError"},"Delete-datasetRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestInternalServerError"},"Delete-datasetRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestNotImplementedError"},"Delete-datasetRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestServiceUnavailableError"},"Delete-datasetRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-datasetRequestGatewayTimeoutError"},"tokenize_Response_200":{"type":"object","properties":{"tokens":{"type":"array","items":{"type":"integer"},"description":"An array of tokens, where each token is an integer."},"token_strings":{"type":"array","items":{"type":"string"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["tokens","token_strings"],"title":"tokenize_Response_200"},"TokenizeRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestBadRequestError"},"TokenizeRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestUnauthorizedError"},"TokenizeRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestForbiddenError"},"TokenizeRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestNotFoundError"},"TokenizeRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestUnprocessableEntityError"},"TokenizeRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestTooManyRequestsError"},"TokenizeRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestInvalidTokenError"},"TokenizeRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestClientClosedRequestError"},"TokenizeRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestInternalServerError"},"TokenizeRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestNotImplementedError"},"TokenizeRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestServiceUnavailableError"},"TokenizeRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"TokenizeRequestGatewayTimeoutError"},"detokenize_Response_200":{"type":"object","properties":{"text":{"type":"string","description":"A string representing the list of tokens."},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["text"],"title":"detokenize_Response_200"},"DetokenizeRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestBadRequestError"},"DetokenizeRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestUnauthorizedError"},"DetokenizeRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestForbiddenError"},"DetokenizeRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestNotFoundError"},"DetokenizeRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestUnprocessableEntityError"},"DetokenizeRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestTooManyRequestsError"},"DetokenizeRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestInvalidTokenError"},"DetokenizeRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestClientClosedRequestError"},"DetokenizeRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestInternalServerError"},"DetokenizeRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestNotImplementedError"},"DetokenizeRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestServiceUnavailableError"},"DetokenizeRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"DetokenizeRequestGatewayTimeoutError"},"CompatibleEndpoint":{"type":"string","enum":["chat","embed","classify","summarize","rerank","rate","generate"],"description":"One of the Cohere API endpoints that the model can be used with.","title":"CompatibleEndpoint"},"GetModelResponseSamplingDefaults":{"type":"object","properties":{"temperature":{"type":"number","format":"double"},"k":{"type":"integer"},"p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"max_tokens_per_doc":{"type":"integer"}},"description":"Default sampling parameters for this model when omitted from API requests.","title":"GetModelResponseSamplingDefaults"},"GetModelResponse":{"type":"object","properties":{"name":{"type":"string","description":"Specify this name in the `model` parameter of API requests to use your chosen model."},"is_deprecated":{"type":"boolean","description":"Whether the model is deprecated or not."},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/CompatibleEndpoint"},"description":"The API endpoints that the model is compatible with."},"finetuned":{"type":"boolean","description":"Whether the model has been fine-tuned or not."},"context_length":{"type":"number","format":"double","description":"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."},"tokenizer_url":{"type":"string","description":"Public URL to the tokenizer's configuration file."},"default_endpoints":{"type":"array","items":{"$ref":"#/components/schemas/CompatibleEndpoint"},"description":"The API endpoints that the model is default to."},"features":{"type":"array","items":{"type":"string"},"description":"The features that the model supports."},"sampling_defaults":{"$ref":"#/components/schemas/GetModelResponseSamplingDefaults","description":"Default sampling parameters for this model when omitted from API requests."}},"description":"Contains information about the model and which API endpoints it can be used with.","title":"GetModelResponse"},"Get-modelRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestBadRequestError"},"Get-modelRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestUnauthorizedError"},"Get-modelRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestForbiddenError"},"Get-modelRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestNotFoundError"},"Get-modelRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestUnprocessableEntityError"},"Get-modelRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestTooManyRequestsError"},"Get-modelRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestInvalidTokenError"},"Get-modelRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestClientClosedRequestError"},"Get-modelRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestInternalServerError"},"Get-modelRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestNotImplementedError"},"Get-modelRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestServiceUnavailableError"},"Get-modelRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-modelRequestGatewayTimeoutError"},"ListModelsResponse":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/GetModelResponse"}},"next_page_token":{"type":"string","description":"A token to retrieve the next page of results. Provide in the page_token parameter of the next request."}},"required":["models"],"title":"ListModelsResponse"},"List-modelsRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestBadRequestError"},"List-modelsRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestUnauthorizedError"},"List-modelsRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestForbiddenError"},"List-modelsRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestNotFoundError"},"List-modelsRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestUnprocessableEntityError"},"List-modelsRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestTooManyRequestsError"},"List-modelsRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestInvalidTokenError"},"List-modelsRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestClientClosedRequestError"},"List-modelsRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestInternalServerError"},"List-modelsRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestNotImplementedError"},"List-modelsRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestServiceUnavailableError"},"List-modelsRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-modelsRequestGatewayTimeoutError"},"ClassifyExample":{"type":"object","properties":{"text":{"type":"string"},"label":{"type":"string"}},"title":"ClassifyExample"},"V1ClassifyPostRequestBodyContentApplicationJsonSchemaTruncate":{"type":"string","enum":["NONE","START","END"],"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","title":"V1ClassifyPostRequestBodyContentApplicationJsonSchemaTruncate"},"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsLabels":{"type":"object","properties":{"confidence":{"type":"number","format":"double"}},"title":"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsLabels"},"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsClassificationType":{"type":"string","enum":["single-label","multi-label"],"description":"The type of classification performed","title":"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsClassificationType"},"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItems":{"type":"object","properties":{"id":{"type":"string"},"input":{"type":"string","description":"The input text that was classified"},"prediction":{"type":"string","description":"The predicted label for the associated query (only filled for single-label models)"},"predictions":{"type":"array","items":{"type":"string"},"description":"An array containing the predicted labels for the associated query (only filled for single-label classification)"},"confidence":{"type":"number","format":"double","description":"The confidence score for the top predicted class (only filled for single-label classification)"},"confidences":{"type":"array","items":{"type":"number","format":"double"},"description":"An array containing the confidence scores of all the predictions in the same order"},"labels":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsLabels"},"description":"A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1."},"classification_type":{"$ref":"#/components/schemas/V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItemsClassificationType","description":"The type of classification performed"}},"required":["id","predictions","confidences","labels","classification_type"],"title":"V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItems"},"classify_Response_200":{"type":"object","properties":{"id":{"type":"string"},"classifications":{"type":"array","items":{"$ref":"#/components/schemas/V1ClassifyPostResponsesContentApplicationJsonSchemaClassificationsItems"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["id","classifications"],"title":"classify_Response_200"},"ClassifyRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestBadRequestError"},"ClassifyRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestUnauthorizedError"},"ClassifyRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestForbiddenError"},"ClassifyRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestNotFoundError"},"ClassifyRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestUnprocessableEntityError"},"ClassifyRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestTooManyRequestsError"},"ClassifyRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestInvalidTokenError"},"ClassifyRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestClientClosedRequestError"},"ClassifyRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestInternalServerError"},"ClassifyRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestNotImplementedError"},"ClassifyRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestServiceUnavailableError"},"ClassifyRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"ClassifyRequestGatewayTimeoutError"},"ConnectorAuthStatus":{"type":"string","enum":["valid","expired"],"description":"The OAuth status for the user making the request. One of [\"valid\", \"expired\", \"\"]. Empty string (field is omitted) means the user has not authorized the connector yet.","title":"ConnectorAuthStatus"},"Connector":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints).\nThis is automatically created from the name of the connector upon registration."},"organization_id":{"type":"string","description":"The organization to which this connector belongs. This is automatically set to\nthe organization of the user who created the connector."},"name":{"type":"string","description":"A human-readable name for the connector."},"description":{"type":"string","description":"A description of the connector."},"url":{"type":"string","description":"The URL of the connector that will be used to search for documents."},"created_at":{"type":"string","format":"date-time","description":"The UTC time at which the connector was created."},"updated_at":{"type":"string","format":"date-time","description":"The UTC time at which the connector was last updated."},"excludes":{"type":"array","items":{"type":"string"},"description":"A list of fields to exclude from the prompt (fields remain in the document)."},"auth_type":{"type":"string","format":"enum","description":"The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth]"},"oauth":{"description":"The OAuth 2.0 configuration for the connector."},"auth_status":{"$ref":"#/components/schemas/ConnectorAuthStatus","description":"The OAuth status for the user making the request. One of [\"valid\", \"expired\", \"\"]. Empty string (field is omitted) means the user has not authorized the connector yet."},"active":{"type":"boolean","description":"Whether the connector is active or not."},"continue_on_failure":{"type":"boolean","description":"Whether a chat request should continue or not if the request to this connector fails."}},"required":["id","name","created_at","updated_at"],"description":"A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.\ndocuments to help answer users.","title":"Connector"},"ListConnectorsResponse":{"type":"object","properties":{"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connector"}},"total_count":{"type":"number","format":"double","description":"Total number of connectors."}},"required":["connectors"],"title":"ListConnectorsResponse"},"List-connectorsRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestBadRequestError"},"List-connectorsRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestUnauthorizedError"},"List-connectorsRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestForbiddenError"},"List-connectorsRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestNotFoundError"},"List-connectorsRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestUnprocessableEntityError"},"List-connectorsRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestTooManyRequestsError"},"List-connectorsRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestInvalidTokenError"},"List-connectorsRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestClientClosedRequestError"},"List-connectorsRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestInternalServerError"},"List-connectorsRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestNotImplementedError"},"List-connectorsRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestServiceUnavailableError"},"List-connectorsRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"List-connectorsRequestGatewayTimeoutError"},"CreateConnectorOAuth":{"type":"object","properties":{"client_id":{"type":"string","description":"The OAuth 2.0 client ID. This fields is encrypted at rest."},"client_secret":{"type":"string","description":"The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response."},"authorize_url":{"type":"string","description":"The OAuth 2.0 /authorize endpoint to use when users authorize the connector."},"token_url":{"type":"string","description":"The OAuth 2.0 /token endpoint to use when users authorize the connector."},"scope":{"type":"string","description":"The OAuth scopes to request when users authorize the connector."}},"title":"CreateConnectorOAuth"},"CreateConnectorServiceAuth":{"type":"object","properties":{"type":{"description":"Reference to AuthTokenType"},"token":{"type":"string","description":"The token that will be used in the HTTP Authorization header when making requests to the connector. This field is encrypted at rest and never returned in a response."}},"required":["type","token"],"title":"CreateConnectorServiceAuth"},"CreateConnectorRequest":{"type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the connector."},"description":{"type":"string","description":"A description of the connector."},"url":{"type":"string","description":"The URL of the connector that will be used to search for documents."},"excludes":{"type":"array","items":{"type":"string"},"description":"A list of fields to exclude from the prompt (fields remain in the document)."},"oauth":{"$ref":"#/components/schemas/CreateConnectorOAuth","description":"The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified."},"active":{"type":"boolean","default":true,"description":"Whether the connector is active or not."},"continue_on_failure":{"type":"boolean","default":false,"description":"Whether a chat request should continue or not if the request to this connector fails."},"service_auth":{"$ref":"#/components/schemas/CreateConnectorServiceAuth","description":"The service to service authentication configuration for the connector. Cannot be specified if oauth is specified."}},"required":["name","url"],"title":"CreateConnectorRequest"},"CreateConnectorResponse":{"type":"object","properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"title":"CreateConnectorResponse"},"Create-connectorRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestBadRequestError"},"Create-connectorRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestUnauthorizedError"},"Create-connectorRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestForbiddenError"},"Create-connectorRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestNotFoundError"},"Create-connectorRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestUnprocessableEntityError"},"Create-connectorRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestTooManyRequestsError"},"Create-connectorRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestInvalidTokenError"},"Create-connectorRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestClientClosedRequestError"},"Create-connectorRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestInternalServerError"},"Create-connectorRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestNotImplementedError"},"Create-connectorRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestServiceUnavailableError"},"Create-connectorRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-connectorRequestGatewayTimeoutError"},"GetConnectorResponse":{"type":"object","properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"title":"GetConnectorResponse"},"Get-connectorRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestBadRequestError"},"Get-connectorRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestUnauthorizedError"},"Get-connectorRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestForbiddenError"},"Get-connectorRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestNotFoundError"},"Get-connectorRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestUnprocessableEntityError"},"Get-connectorRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestTooManyRequestsError"},"Get-connectorRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestInvalidTokenError"},"Get-connectorRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestClientClosedRequestError"},"Get-connectorRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestInternalServerError"},"Get-connectorRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestNotImplementedError"},"Get-connectorRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestServiceUnavailableError"},"Get-connectorRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Get-connectorRequestGatewayTimeoutError"},"UpdateConnectorRequest":{"type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the connector."},"url":{"type":"string","description":"The URL of the connector that will be used to search for documents."},"excludes":{"type":"array","items":{"type":"string"},"description":"A list of fields to exclude from the prompt (fields remain in the document)."},"oauth":{"$ref":"#/components/schemas/CreateConnectorOAuth","description":"The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified."},"active":{"type":"boolean","default":true},"continue_on_failure":{"type":"boolean","default":false},"service_auth":{"$ref":"#/components/schemas/CreateConnectorServiceAuth","description":"The service to service authentication configuration for the connector. Cannot be specified if oauth is specified."}},"title":"UpdateConnectorRequest"},"UpdateConnectorResponse":{"type":"object","properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"title":"UpdateConnectorResponse"},"Update-connectorRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestBadRequestError"},"Update-connectorRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestUnauthorizedError"},"Update-connectorRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestForbiddenError"},"Update-connectorRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestNotFoundError"},"Update-connectorRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestUnprocessableEntityError"},"Update-connectorRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestTooManyRequestsError"},"Update-connectorRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestInvalidTokenError"},"Update-connectorRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestClientClosedRequestError"},"Update-connectorRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestInternalServerError"},"Update-connectorRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestNotImplementedError"},"Update-connectorRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestServiceUnavailableError"},"Update-connectorRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Update-connectorRequestGatewayTimeoutError"},"DeleteConnectorResponse":{"type":"object","properties":{},"title":"DeleteConnectorResponse"},"Delete-connectorRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestBadRequestError"},"Delete-connectorRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestUnauthorizedError"},"Delete-connectorRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestForbiddenError"},"Delete-connectorRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestNotFoundError"},"Delete-connectorRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestUnprocessableEntityError"},"Delete-connectorRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestTooManyRequestsError"},"Delete-connectorRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestInvalidTokenError"},"Delete-connectorRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestClientClosedRequestError"},"Delete-connectorRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestInternalServerError"},"Delete-connectorRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestNotImplementedError"},"Delete-connectorRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestServiceUnavailableError"},"Delete-connectorRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Delete-connectorRequestGatewayTimeoutError"},"OAuthAuthorizeResponse":{"type":"object","properties":{"redirect_url":{"type":"string","description":"The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector."}},"title":"OAuthAuthorizeResponse"},"OAuthAuthorize-connectorRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestBadRequestError"},"OAuthAuthorize-connectorRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestUnauthorizedError"},"OAuthAuthorize-connectorRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestForbiddenError"},"OAuthAuthorize-connectorRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestNotFoundError"},"OAuthAuthorize-connectorRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestUnprocessableEntityError"},"OAuthAuthorize-connectorRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestTooManyRequestsError"},"OAuthAuthorize-connectorRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestInvalidTokenError"},"OAuthAuthorize-connectorRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestClientClosedRequestError"},"OAuthAuthorize-connectorRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestInternalServerError"},"OAuthAuthorize-connectorRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestNotImplementedError"},"OAuthAuthorize-connectorRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestServiceUnavailableError"},"OAuthAuthorize-connectorRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"OAuthAuthorize-connectorRequestGatewayTimeoutError"},"BaseModel":{"type":"object","properties":{"name":{"type":"string","description":"The name of the base model."},"version":{"type":"string","description":"read-only. The version of the base model."},"base_type":{"description":"The type of the base model."},"strategy":{"description":"Deprecated: The fine-tuning strategy.","default":"STRATEGY_UNSPECIFIED"}},"required":["base_type"],"description":"The base model used for fine-tuning.","title":"BaseModel"},"Hyperparameters":{"type":"object","properties":{"early_stopping_patience":{"type":"integer","description":"Stops training if the loss metric does not improve beyond the value of\n`early_stopping_threshold` after this many times of evaluation."},"early_stopping_threshold":{"type":"number","format":"double","description":"How much the loss must improve to prevent early stopping."},"train_batch_size":{"type":"integer","description":"The batch size is the number of training examples included in a single\ntraining pass."},"train_epochs":{"type":"integer","description":"The number of epochs to train for."},"learning_rate":{"type":"number","format":"double","description":"The learning rate to be used during training."},"lora_alpha":{"type":"integer","description":"Controls the scaling factor for LoRA updates. Higher values make the\nupdates more impactful."},"lora_rank":{"type":"integer","description":"Specifies the rank for low-rank matrices. Lower ranks reduce parameters\nbut may limit model flexibility."},"lora_target_modules":{"description":"The combination of LoRA modules to target.","default":"LORA_TARGET_MODULES_UNSPECIFIED"}},"description":"The fine-tuning hyperparameters.","title":"Hyperparameters"},"WandbConfig":{"type":"object","properties":{"project":{"type":"string","description":"The WandB project name to be used during training."},"api_key":{"type":"string","description":"The WandB API key to be used during training."},"entity":{"type":"string","description":"The WandB entity name to be used during training."}},"required":["project","api_key"],"description":"The Weights & Biases configuration.","title":"WandbConfig"},"Settings":{"type":"object","properties":{"base_model":{"$ref":"#/components/schemas/BaseModel","description":"The base model to fine-tune."},"dataset_id":{"type":"string","description":"The data used for training and evaluating the fine-tuned model."},"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters","description":"Fine-tuning hyper-parameters."},"multi_label":{"type":"boolean","description":"read-only. Whether the model is single-label or multi-label (only for classification)."},"wandb":{"$ref":"#/components/schemas/WandbConfig","description":"The Weights & Biases configuration (Chat fine-tuning only)."}},"required":["base_model","dataset_id"],"description":"The configuration used for fine-tuning.","title":"Settings"},"Status":{"type":"string","enum":["STATUS_UNSPECIFIED","STATUS_FINETUNING","STATUS_DEPLOYING_API","STATUS_READY","STATUS_FAILED","STATUS_DELETED","STATUS_TEMPORARILY_OFFLINE","STATUS_PAUSED","STATUS_QUEUED"],"default":"STATUS_UNSPECIFIED","description":"The possible stages of a fine-tuned model life-cycle.\n\n - STATUS_UNSPECIFIED: Unspecified status.\n - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.\n - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed.\n - STATUS_READY: The fine-tuned model is ready to receive requests.\n - STATUS_FAILED: The fine-tuned model failed.\n - STATUS_DELETED: The fine-tuned model was deleted.\n - STATUS_TEMPORARILY_OFFLINE: Deprecated: The fine-tuned model is temporarily unavailable.\n - STATUS_PAUSED: Deprecated: The fine-tuned model is paused (Vanilla only).\n - STATUS_QUEUED: The fine-tuned model is queued for training.","title":"Status"},"FinetunedModel":{"type":"object","properties":{"id":{"type":"string","description":"read-only. FinetunedModel ID."},"name":{"type":"string","description":"FinetunedModel name (e.g. `foobar`)."},"creator_id":{"type":"string","description":"read-only. User ID of the creator."},"organization_id":{"type":"string","description":"read-only. Organization ID."},"settings":{"$ref":"#/components/schemas/Settings","description":"FinetunedModel settings such as dataset, hyperparameters..."},"status":{"$ref":"#/components/schemas/Status","default":"STATUS_UNSPECIFIED","description":"read-only. Current stage in the life-cycle of the fine-tuned model."},"created_at":{"type":"string","format":"date-time","description":"read-only. Creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"read-only. Latest update timestamp."},"completed_at":{"type":"string","format":"date-time","description":"read-only. Timestamp for the completed fine-tuning."},"last_used":{"type":"string","format":"date-time","description":"read-only. Deprecated: Timestamp for the latest request to this fine-tuned model."}},"required":["name","settings"],"description":"This resource represents a fine-tuned model.","title":"FinetunedModel"},"ListFinetunedModelsResponse":{"type":"object","properties":{"finetuned_models":{"type":"array","items":{"$ref":"#/components/schemas/FinetunedModel"},"description":"List of fine-tuned models matching the request."},"next_page_token":{"type":"string","description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request."},"total_size":{"type":"integer","description":"Total count of results."}},"description":"Response to a request to list fine-tuned models.","title":"ListFinetunedModelsResponse"},"Error":{"type":"object","properties":{"message":{"type":"string","description":"A developer-facing error message."}},"description":"Error is the response for any unsuccessful event.","title":"Error"},"CreateFinetunedModelResponse":{"type":"object","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"description":"Response to request to create a fine-tuned model.","title":"CreateFinetunedModelResponse"},"UpdateFinetunedModelResponse":{"type":"object","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"description":"Response to a request to update a fine-tuned model.","title":"UpdateFinetunedModelResponse"},"GetFinetunedModelResponse":{"type":"object","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"description":"Response to a request to get a fine-tuned model.","title":"GetFinetunedModelResponse"},"DeleteFinetunedModelResponse":{"type":"object","properties":{},"description":"Response to request to delete a fine-tuned model.","title":"DeleteFinetunedModelResponse"},"Event":{"type":"object","properties":{"user_id":{"type":"string","description":"ID of the user who initiated the event. Empty if initiated by the system."},"status":{"$ref":"#/components/schemas/Status","default":"STATUS_UNSPECIFIED","description":"Status of the fine-tuned model."},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the event happened."}},"description":"A change in status of a fine-tuned model.","title":"Event"},"ListEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"},"description":"List of events for the fine-tuned model."},"next_page_token":{"type":"string","description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request."},"total_size":{"type":"integer","description":"Total count of results."}},"description":"Response to a request to list events of a fine-tuned model.","title":"ListEventsResponse"},"TrainingStepMetrics":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","description":"Creation timestamp."},"step_number":{"type":"integer","description":"Step number."},"metrics":{"type":"object","additionalProperties":{"type":"number","format":"double"},"description":"Map of names and values for each evaluation metrics."}},"description":"The evaluation metrics at a given step of the training of a fine-tuned model.","title":"TrainingStepMetrics"},"ListTrainingStepMetricsResponse":{"type":"object","properties":{"step_metrics":{"type":"array","items":{"$ref":"#/components/schemas/TrainingStepMetrics"},"description":"The metrics for each step the evaluation was run on."},"next_page_token":{"type":"string","description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request."}},"description":"Response to a request to list training-step metrics of a fine-tuned model.","title":"ListTrainingStepMetricsResponse"},"V1GeneratePostRequestBodyContentApplicationJsonSchemaTruncate":{"type":"string","enum":["NONE","START","END"],"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","title":"V1GeneratePostRequestBodyContentApplicationJsonSchemaTruncate"},"V1GeneratePostRequestBodyContentApplicationJsonSchemaReturnLikelihoods":{"type":"string","enum":["GENERATION","ALL","NONE"],"default":"NONE","description":"One of `GENERATION|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.\n\nIf `GENERATION` is selected, the token likelihoods will only be provided for generated text.\n\nWARNING: `ALL` is deprecated, and will be removed in a future release.","title":"V1GeneratePostRequestBodyContentApplicationJsonSchemaReturnLikelihoods"},"SingleGenerationTokenLikelihoodsItems":{"type":"object","properties":{"token":{"type":"string"},"likelihood":{"type":"number","format":"double"}},"required":["token","likelihood"],"title":"SingleGenerationTokenLikelihoodsItems"},"SingleGeneration":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"index":{"type":"integer","description":"Refers to the nth generation. Only present when `num_generations` is greater than zero."},"likelihood":{"type":"number","format":"double"},"token_likelihoods":{"type":"array","items":{"$ref":"#/components/schemas/SingleGenerationTokenLikelihoodsItems"},"description":"Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you've created a [custom model](https://docs.cohere.com/docs/training-custom-models). Individual token likelihoods provide the log-likelihood of each token. The first token will not have a likelihood."}},"required":["id","text"],"title":"SingleGeneration"},"generate_Response_stream":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string","description":"Prompt used for generations."},"generations":{"type":"array","items":{"$ref":"#/components/schemas/SingleGeneration"},"description":"List of generated results"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"required":["id","generations"],"title":"generate_Response_stream"},"GenerateRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestBadRequestError"},"GenerateRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestUnauthorizedError"},"GenerateRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestForbiddenError"},"GenerateRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestNotFoundError"},"GenerateRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestUnprocessableEntityError"},"GenerateRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestTooManyRequestsError"},"GenerateRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestInvalidTokenError"},"GenerateRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestClientClosedRequestError"},"GenerateRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestInternalServerError"},"GenerateRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestNotImplementedError"},"GenerateRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestServiceUnavailableError"},"GenerateRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"GenerateRequestGatewayTimeoutError"},"SingleGenerationInStream":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","description":"Full text of the generation."},"index":{"type":"integer","description":"Refers to the nth generation. Only present when `num_generations` is greater than zero."},"finish_reason":{"$ref":"#/components/schemas/FinishReason"}},"required":["id","text","finish_reason"],"title":"SingleGenerationInStream"},"GenerateStreamEndResponse":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"generations":{"type":"array","items":{"$ref":"#/components/schemas/SingleGenerationInStream"}}},"required":["id"],"title":"GenerateStreamEndResponse"},"generate_Response_stream_streaming":{"oneOf":[{"type":"object","properties":{"event_type":{"type":"string","enum":["text-generation"],"description":"Discriminator value: text-generation"},"text":{"type":"string","description":"A segment of text of the generation."},"index":{"type":"integer","description":"Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed."},"is_finished":{"type":"boolean"}},"required":["event_type","text","is_finished"],"description":"text-generation variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["stream-end"],"description":"Discriminator value: stream-end"},"is_finished":{"type":"boolean"},"finish_reason":{"$ref":"#/components/schemas/FinishReason"},"response":{"$ref":"#/components/schemas/GenerateStreamEndResponse"}},"required":["event_type","is_finished","response"],"description":"stream-end variant"},{"type":"object","properties":{"event_type":{"type":"string","enum":["stream-error"],"description":"Discriminator value: stream-error"},"index":{"type":"integer","description":"Refers to the nth generation. Only present when `num_generations` is greater than zero."},"is_finished":{"type":"boolean"},"finish_reason":{"$ref":"#/components/schemas/FinishReason"},"err":{"type":"string","description":"Error message"}},"required":["event_type","is_finished","finish_reason","err"],"description":"stream-error variant"}],"discriminator":{"propertyName":"event_type"},"description":"Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse.","title":"generate_Response_stream_streaming"},"V1SummarizePostRequestBodyContentApplicationJsonSchemaLength":{"type":"string","enum":["short","medium","long"],"default":"medium","description":"One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.","title":"V1SummarizePostRequestBodyContentApplicationJsonSchemaLength"},"V1SummarizePostRequestBodyContentApplicationJsonSchemaFormat":{"type":"string","enum":["paragraph","bullets"],"default":"paragraph","description":"One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.","title":"V1SummarizePostRequestBodyContentApplicationJsonSchemaFormat"},"V1SummarizePostRequestBodyContentApplicationJsonSchemaExtractiveness":{"type":"string","enum":["low","medium","high"],"default":"low","description":"One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.","title":"V1SummarizePostRequestBodyContentApplicationJsonSchemaExtractiveness"},"summarize_Response_200":{"type":"object","properties":{"id":{"type":"string","description":"Generated ID for the summary"},"summary":{"type":"string","description":"Generated summary for the text"},"meta":{"$ref":"#/components/schemas/ApiMeta"}},"title":"summarize_Response_200"},"SummarizeRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestBadRequestError"},"SummarizeRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestUnauthorizedError"},"SummarizeRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestForbiddenError"},"SummarizeRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestNotFoundError"},"SummarizeRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestUnprocessableEntityError"},"SummarizeRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestTooManyRequestsError"},"SummarizeRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestInvalidTokenError"},"SummarizeRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestClientClosedRequestError"},"SummarizeRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestInternalServerError"},"SummarizeRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestNotImplementedError"},"SummarizeRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestServiceUnavailableError"},"SummarizeRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"SummarizeRequestGatewayTimeoutError"},"checkAPIKey_Response_200":{"type":"object","properties":{"valid":{"type":"boolean"},"organization_id":{"type":"string"},"owner_id":{"type":"string"}},"required":["valid"],"title":"checkAPIKey_Response_200"},"CheckAPIKeyRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestBadRequestError"},"CheckAPIKeyRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestUnauthorizedError"},"CheckAPIKeyRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestForbiddenError"},"CheckAPIKeyRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestNotFoundError"},"CheckAPIKeyRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestUnprocessableEntityError"},"CheckAPIKeyRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestTooManyRequestsError"},"CheckAPIKeyRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestInvalidTokenError"},"CheckAPIKeyRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestClientClosedRequestError"},"CheckAPIKeyRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestInternalServerError"},"CheckAPIKeyRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestNotImplementedError"},"CheckAPIKeyRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestServiceUnavailableError"},"CheckAPIKeyRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"CheckAPIKeyRequestGatewayTimeoutError"},"audio_transcriptions_create_Response_200":{"type":"object","properties":{"text":{"type":"string","description":"The transcribed text."}},"required":["text"],"title":"audio_transcriptions_create_Response_200"},"Create-transcriptionRequestBadRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestBadRequestError"},"Create-transcriptionRequestUnauthorizedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestUnauthorizedError"},"Create-transcriptionRequestForbiddenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestForbiddenError"},"Create-transcriptionRequestNotFoundError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestNotFoundError"},"Create-transcriptionRequestUnprocessableEntityError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestUnprocessableEntityError"},"Create-transcriptionRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestTooManyRequestsError"},"Create-transcriptionRequestInvalidTokenError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestInvalidTokenError"},"Create-transcriptionRequestClientClosedRequestError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestClientClosedRequestError"},"Create-transcriptionRequestInternalServerError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestInternalServerError"},"Create-transcriptionRequestNotImplementedError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestNotImplementedError"},"Create-transcriptionRequestServiceUnavailableError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestServiceUnavailableError"},"Create-transcriptionRequestGatewayTimeoutError":{"type":"object","properties":{"message":{"type":"string"},"id":{"type":"string"}},"title":"Create-transcriptionRequestGatewayTimeoutError"},"Batch":{"type":"object","properties":{"id":{"type":"string","description":"read-only. Batch ID."},"name":{"type":"string","description":"Batch name (e.g. `foobar`)."},"creator_id":{"type":"string","description":"read-only. User ID of the creator."},"org_id":{"type":"string","description":"read-only. Organization ID."},"status":{"description":"read-only. Current stage in the life-cycle of the batch.","default":"BATCH_STATUS_UNSPECIFIED"},"created_at":{"type":"string","format":"date-time","description":"read-only. Creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"read-only. Latest update timestamp."},"input_dataset_id":{"type":"string","description":"ID of the dataset the batch reads inputs from."},"output_dataset_id":{"type":"string"},"input_tokens":{"type":"string","format":"int64","description":"read-only. The total number of input tokens in the batch."},"output_tokens":{"type":"string","format":"int64","description":"read-only. The total number of output tokens in the batch."},"model":{"type":"string","description":"The name of the model the batch uses."},"num_records":{"type":"integer","description":"read-only. The total number of records in the batch."},"num_successful_records":{"type":"integer","description":"read-only. The current number of successful records in the batch."},"num_failed_records":{"type":"integer","description":"read-only. The current number of failed records in the batch."},"status_reason":{"type":"string","description":"read-only. More details about the reason for the status of a batch job."}},"required":["name","input_dataset_id","model"],"description":"This resource represents a batch job.","title":"Batch"},"ListBatchesResponse":{"type":"object","properties":{"batches":{"type":"array","items":{"$ref":"#/components/schemas/Batch"},"description":"The batches that belong to the authenticated user."},"next_page_token":{"type":"string","description":"A token, which can be sent as `page_token` to retrieve the next page.\nIf this field is omitted, there are no subsequent pages."}},"description":"Response to a request to list batches.","title":"ListBatchesResponse"},"BatchError":{"type":"object","properties":{"message":{"type":"string","description":"A developer-facing error message."}},"description":"Error is the response for any unsuccessful event.","title":"BatchError"},"CreateBatchResponse":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch","description":"Information about the batch."}},"required":["batch"],"description":"Response to request to create a batch.","title":"CreateBatchResponse"},"GetBatchResponse":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch","description":"Information about the batch."}},"required":["batch"],"description":"Response to a request to get a batch.","title":"GetBatchResponse"},"CancelBatchResponse":{"type":"object","properties":{},"description":"Response to a request to cancel a batch.","title":"CancelBatchResponse"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}