{"openapi":"3.0.0","info":{"description":"Cohere enterprise AI platform API — chat (Command models), embeddings, rerank, classify, parse, fine-tuning, datasets, connectors and batches via api.cohere.com (v1 + v2).","version":null},"servers":[{"description":"Cohere enterprise AI platform API — chat (Command models), embeddings, rerank, classify, parse, fine-tuning, datasets, connectors and batches via api.cohere.com (v1 + v2).","url":"https://api.apirails.com/cohere"}],"paths":{"/v2/chat":{"post":{"tags":["Chat"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/chat"},"summary":"Chat API (v2)","description":"Generates a text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api). Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"citation_options":{"type":"object","description":"Options for controlling citation generation.","properties":{"mode":{"type":"string","description":"Defaults to \"enabled\". Citations are enabled by default for models that support it, but can be turned off by setting \"type\": \"disabled\"."}}},"documents":{"type":"array","description":"A list of relevant documents that the model can cite to generate a more accurate reply. Each document is either a string or document object with content and metadata.","items":{"type":"object","properties":{"data":{"type":"object","description":"A relevant document that the model can cite to generate a more accurate reply. Each document is a string-any dictionary."},"id":{"type":"string","description":"Unique identifier for this document which will be referenced in citations. If not provided an ID will be automatically generated."}}}},"frequency_penalty":{"type":"number","description":"Defaults to 0.0, min value of 0.0, max value of 1.0. 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."},"k":{"type":"number","description":"Ensures that only the top k most likely tokens are considered for generation at each step. When k is set to 0, k-sampling is disabled. Defaults to 0, min value of 0, max value of 500."},"logprobs":{"type":"boolean","description":"Defaults to false. When set to true, the log probabilities of the generated tokens will be included in the response.","enum":[true,false]},"max_tokens":{"type":"number","description":"The maximum number of output tokens the model will generate in the response. If not set, max_tokens defaults to the model's maximum output token limit. You can find the maximum output token limits for each model in the [model documentation](https://docs.cohere.com/docs/models). Note: Setting a low value may result in i"},"messages":{"type":"array","description":"A list of chat messages in chronological order, representing a conversation between the user and the model. Messages can be from User, Assistant, Tool and System roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/v2/docs/chat-api).","required":true,"items":{"type":"object","properties":{"citations":{"type":"array","description":"Citations"},"content":{"type":"object","description":"The content of the message. This can be a string or a list of content blocks. If a string is provided, it will be treated as a text content block."},"role":{"type":"string","description":"Discriminator value: user","required":true},"tool_call_id":{"type":"string","description":"The id of the associated tool call that has provided the given content"},"tool_calls":{"type":"array","description":"Tool_calls"},"tool_plan":{"type":"string","description":"A chain-of-thought style reflection and plan that the model generates when working with Tools."}}}},"model":{"type":"string","description":"The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models).","required":true},"p":{"type":"number","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. Defaults to 0.75. min value of 0.01, max value of 0.99."},"presence_penalty":{"type":"number","description":"Defaults to 0.0, min value of 0.0, max value of 1.0. 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."},"priority":{"type":"number","description":"Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped."},"response_format":{"type":"object","description":"Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/v2/docs/command-r), [Command R+](https://docs.cohere.com/v2/docs/command-r-plus) and newer models. The model can be forced into outputting JSON objects by setting { \"type\": \"json_object\" }. A [","properties":{"type":{"type":"string","description":"Discriminator value: text","required":true},"json_schema":{"type":"object","description":"A [JSON schema](https://json-schema.org/overview/what-is-jsonschema) 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. Example (required name and age object): json"}}},"safety_mode":{"type":"string","description":"Used to select the [safety instruction](https://docs.cohere.com/v2/docs/safety-modes) inserted into the prompt. Defaults to CONTEXTUAL. When OFF is specified, the safety instruction will be omitted. Safety modes are not yet configurable in combination with tools and documents parameters. Note: This parameter is only co"},"seed":{"type":"number","description":"If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed."},"stop_sequences":{"type":"array","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.","items":{"type":"string"}},"stream":{"type":"boolean","description":"Defaults to false. When true, the response will be a SSE stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.","required":true,"enum":[true,false]},"strict_tools":{"type":"boolean","description":"When set to true, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools). Note: The first few requests with a new set of tools will take longer to proce","enum":[true,false]},"temperature":{"type":"number","description":"Defaults to 0.3. A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations. Randomness can be further maximized by increasing the value of the p parameter."},"thinking":{"type":"object","description":"Configuration for [reasoning features](https://docs.cohere.com/docs/reasoning).","properties":{"type":{"type":"string","description":"Reasoning is enabled by default for models that support it, but can be turned off by setting \"type\": \"disabled\".","required":true},"token_budget":{"type":"number","description":"The maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response."}}},"tool_choice":{"type":"string","description":"Used to control whether or not the model will be forced to use a tool when answering. When REQUIRED is specified, the model will be forced to use at least one of the user-defined tools, and the tools parameter must be passed in the request. When NONE is specified, the model will be forced not to use one of the specifie"},"tools":{"type":"array","description":"A list of tools (functions) available to the model. The model response may contain 'tool_calls' to the specified tools. Learn more in the [Tool Use guide](https://docs.cohere.com/docs/tools).","items":{"type":"object","properties":{"type":{"type":"string","description":"Type","required":true},"function":{"type":"object","description":"The function to be executed."}}}}}},"example":{"citation_options":[{}],"documents":[],"frequency_penalty":"","k":"","logprobs":"","max_tokens":"","messages":[],"model":"","p":"","presence_penalty":"","priority":"","response_format":[{}],"safety_mode":"","seed":"","stop_sequences":[],"stream":"","strict_tools":"","temperature":"","thinking":[{}],"tool_choice":"","tools":[]}}}}}},"/v2/rerank":{"post":{"tags":["Rerank"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/rerank"},"summary":"Rerank API (v2)","description":"This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"documents":{"type":"array","description":"A list of texts that will be compared to the query. For optimal performance we recommend against sending more than 1,000 documents in a single request. Note: long documents will automatically be truncated to the value of max_tokens_per_doc. Note: structured data should be formatted as YAML strings for best performance.","required":true,"items":{"type":"string"}},"max_tokens_per_doc":{"type":"number","description":"Defaults to 4096. Long documents will be automatically truncated to the specified number of tokens."},"model":{"type":"string","description":"The identifier of the model to use, eg rerank-v3.5.","required":true},"priority":{"type":"number","description":"Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped."},"query":{"type":"string","description":"The search query","required":true},"top_n":{"type":"number","description":"Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned."}}},"example":{"documents":[],"max_tokens_per_doc":"","model":"","priority":"","query":"","top_n":""}}}}}},"/v2/embed":{"post":{"tags":["Embed"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/embed"},"summary":"Embed API (v2)","description":"This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If 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).","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"embedding_types":{"type":"array","description":"Specifies the types of embeddings you want to get back. Can be one or more of the following types. \"float\": Use this when you want to get back the default float embeddings. Supported with all Embed models. \"int8\": Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed model","items":{"type":"string"}},"images":{"type":"array","description":"An array of image data URIs for the model to embed. The 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. Image embeddings are supported with Embed v3.0 and newer models. For Embed v3.x mod","items":{"type":"string"}},"input_type":{"type":"string","description":"Specifies the type of input passed to the model. Required for embedding models v3 and higher. - \"search_document\": Used for embeddings stored in a vector database for search use-cases. - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents. - \"classification\": Used fo","required":true},"inputs":{"type":"array","description":"An array of inputs for the model to embed. Maximum number of inputs per call is 96. An input can contain a mix of text and image components.","items":{"type":"object","properties":{"content":{"type":"array","description":"An array of objects containing the input data for the model to embed.","required":true}}}},"max_tokens":{"type":"number","description":"The maximum number of tokens to embed per input. If the input text is longer than this, it will be truncated according to the truncate parameter."},"model":{"type":"string","description":"ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).","required":true},"output_dimension":{"type":"number","description":"The number of dimensions of the output embedding. This is only available for embed-v4 and newer models. Possible values are 256, 512, 1024, and 1536. The default is 1536."},"priority":{"type":"number","description":"Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped."},"texts":{"type":"array","description":"An array of strings for the model to embed. Maximum number of texts per call is 96.","items":{"type":"string"}},"truncate":{"type":"string","description":"One of NONE|START|END to specify how the API will handle inputs longer than the maximum token length. Passing 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. If NONE is"}}},"example":{"embedding_types":[],"images":[],"input_type":"","inputs":[],"max_tokens":"","model":"","output_dimension":"","priority":"","texts":[],"truncate":""}}}}}},"/v1/embed-jobs":{"post":{"tags":["Embed Jobs"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/embed-jobs"},"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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"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","required":true},"embedding_types":{"type":"array","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. \"float\": Use this when you want to get back the default float embeddings. Valid for all models. \"int8\": Use this when you want to get back si","items":{"type":"string"}},"input_type":{"type":"string","description":"Specifies the type of input passed to the model. Required for embedding models v3 and higher. - \"search_document\": Used for embeddings stored in a vector database for search use-cases. - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents. - \"classification\": Used fo","required":true},"model":{"type":"string","description":"ID of the embedding model. Available models and corresponding embedding dimensions: - embed-english-v3.0 : 1024 - embed-multilingual-v3.0 : 1024 - embed-english-light-v3.0 : 384 - embed-multilingual-light-v3.0 : 384","required":true},"name":{"type":"string","description":"The name of the embed job."},"truncate":{"type":"string","description":"One of START|END to specify how the API will handle inputs longer than the maximum token length. Passing 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."}}},"example":{"dataset_id":"","embedding_types":[],"input_type":"","model":"","name":"","truncate":""}}}}},"get":{"tags":["Embed Jobs"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/embed-jobs"},"summary":"List Embed Jobs","description":"The list embed job endpoint allows users to view all embed jobs history for that specific user.","security":[{"bearerAuth":[]}]}},"/v1/embed-jobs/{id}":{"get":{"tags":["Embed Jobs"],"parameters":[{"name":"id","in":"path","description":"The ID of the embed job to retrieve.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/embed-jobs/{id}"},"summary":"Fetch an Embed Job","description":"This API retrieves the details about an embed job started by the same user.","security":[{"bearerAuth":[]}]}},"/v1/embed-jobs/{id}/cancel":{"post":{"tags":["Embed Jobs"],"parameters":[{"name":"id","in":"path","description":"The ID of the embed job to cancel.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/embed-jobs/{id}/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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v2/parse":{"post":{"tags":["Document Parse"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/parse"},"summary":"Parse API (v2)","description":"Parse a document image into structured output. Use output_format to select blocks or markdown (default). Currently supports document.type = image_url only (data URI or remote http(s) image URL). PDF / file URL inputs are not yet supported. Image limits: 20 MB file size; 50 megapixels or 200 MB decoded (whichever is exceeded first).","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"document":{"type":"object","description":"Document to parse. Currently only image_url documents are supported.","required":true,"properties":{"type":{"type":"string","description":"Discriminator for the document payload.","required":true},"image_url":{"type":"string","description":"Image URL or base64 data URI to parse. Limits: - Maximum file size: 20 MB (compressed upload, download, or decoded data-URI payload) - Maximum decoded size: 50 megapixels or 200 MB decompressed (whichever is exceeded first)","required":true}}},"model":{"type":"string","description":"The name of a compatible Cohere parse model.","required":true},"output_format":{"type":"string","description":"Selects the page payload shape in the response. Defaults to \"markdown\". - \"markdown\": each page includes markdown content. Tables are inlined as HTML, and images are referenced as ![<description>]( ) with matching entries in page.markdown.images. - \"blocks\": each page includes an ordered blocks array of text, image, an"}}},"example":{"document":[{}],"model":"","output_format":""}}}}}},"/v2/audio/transcriptions":{"post":{"tags":["Audio"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/audio/transcriptions"},"summary":"Create a transcription","description":"Transcribe an audio file.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"file":{"type":"string","format":"binary","description":"The audio file object to transcribe. Supported file extensions are flac, mp3, mpeg, mpga, ogg, and wav.","required":true},"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.","required":true},"model":{"type":"string","description":"ID of the model to use.","required":true},"temperature":{"type":"number","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."}}},"example":{"file":"(binary)","language":"","model":"","temperature":""}}}}}},"/v2/batches":{"post":{"tags":["Batches"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/batches"},"summary":"Create a batch","description":"Creates and executes a batch from an uploaded dataset of requests","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"created_at":{"type":"string","description":"read-only. Creation timestamp."},"creator_id":{"type":"string","description":"read-only. User ID of the creator."},"id":{"type":"string","description":"read-only. Batch ID."},"input_dataset_id":{"type":"string","description":"ID of the dataset the batch reads inputs from.","required":true},"input_tokens":{"type":"string","description":"read-only. The total number of input tokens in the batch."},"model":{"type":"string","description":"The name of the model the batch uses.","required":true},"name":{"type":"string","description":"Batch name (e.g. foobar).","required":true},"num_failed_records":{"type":"number","description":"read-only. The current number of failed records in the batch."},"num_records":{"type":"number","description":"read-only. The total number of records in the batch."},"num_successful_records":{"type":"number","description":"read-only. The current number of successful records in the batch."},"org_id":{"type":"string","description":"read-only. Organization ID."},"output_dataset_id":{"type":"string","description":"Output_dataset_id"},"output_tokens":{"type":"string","description":"read-only. The total number of output tokens in the batch."},"status":{"type":"string","description":"The possible stages of a batch life-cycle. - BATCH_STATUS_UNSPECIFIED: Unspecified status. - BATCH_STATUS_QUEUED: The batch has been queued. - BATCH_STATUS_IN_PROGRESS: The batch is in-progress. - BATCH_STATUS_CANCELING: The batch is being canceled. - BATCH_STATUS_COMPLETED: The batch has been completed. - BATCH_STATUS"},"status_reason":{"type":"string","description":"read-only. More details about the reason for the status of a batch job."},"updated_at":{"type":"string","description":"read-only. Latest update timestamp."}}},"example":{"created_at":"","creator_id":"","id":"","input_dataset_id":"","input_tokens":"","model":"","name":"","num_failed_records":"","num_records":"","num_successful_records":"","org_id":"","output_dataset_id":"","output_tokens":"","status":"","status_reason":"","updated_at":""}}}}},"get":{"tags":["Batches"],"parameters":[{"name":"order_by","in":"query","description":"Batches can be ordered by creation time or last updated time. Use created_at for creation time or updated_at for last updated time.","schema":{"type":"string","example":""}},{"name":"page_size","in":"query","description":"The maximum number of batches to return. The service may return fewer than this value. If unspecified, at most 50 batches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.","schema":{"type":"number","example":""}},{"name":"page_token","in":"query","description":"A page token, received from a previous ListBatches call. Provide this to retrieve the subsequent page.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/batches"},"summary":"List batches","description":"List the batches for the current user","security":[{"bearerAuth":[]}]}},"/v2/batches/{id}":{"get":{"tags":["Batches"],"parameters":[{"name":"id","in":"path","description":"The batch ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/batches/{id}"},"summary":"Retrieve a batch","description":"Retrieves a batch","security":[{"bearerAuth":[]}]}},"/v2/batches/{id}:cancel":{"post":{"tags":["Batches"],"parameters":[{"name":"id","in":"path","description":"The batch ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v2/batches/{id}:cancel"},"summary":"Cancel a batch","description":"Cancels an in-progress batch","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/chat":{"post":{"tags":["Chat"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/chat"},"summary":"Chat API (v1)","description":"Generates a streamed text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"chat_history":{"type":"array","description":"A list of previous messages between the user and the model, giving the model conversational context for responding to the user's message. Each 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,","items":{"type":"object","properties":{"message":{"type":"string","description":"Contents of the chat message."},"role":{"type":"string","description":"Discriminator value: CHATBOT","required":true},"tool_calls":{"type":"array","description":"Tool_calls"},"tool_results":{"type":"array","description":"Tool_results"}}}},"citation_quality":{"type":"string","description":"Defaults to \"enabled\". Citations are enabled by default for models that support it, but can be turned off by setting \"type\": \"disabled\". Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"connectors":{"type":"array","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. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG)","items":{"type":"object","properties":{"continue_on_failure":{"type":"boolean","description":"Defaults to false. When true, the request will continue if this connector returned an error.","enum":[true,false]},"id":{"type":"string","description":"The identifier of the connector.","required":true},"options":{"type":"object","description":"Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector. For example, the connector web-search supports the site option, which limits search results to the specified domain."},"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."}}}},"conversation_id":{"type":"string","description":"An alternative to chat_history. Providing a conversation_id creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string. Compatible Deployments: Cohere Platform"},"documents":{"type":"array","description":"A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary. Example: [ { \"title\": \"Tall penguins\", \"text\": \"Emperor penguins are the tallest.\" }, { \"title\": \"Penguin habitats\", \"text\": \"Emperor penguins only live in Antarctica.\" }, ] Keys and valu","items":{"type":"object","properties":{}}},"force_single_step":{"type":"boolean","description":"Forces the chat to be single step. Defaults to false.","enum":[true,false]},"frequency_penalty":{"type":"number","description":"Defaults to 0.0, min value of 0.0, max value of 1.0. 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. Compatible Deployments: Cohere Platfo"},"k":{"type":"number","description":"Ensures only the top k most likely tokens are considered for generation at each step. Defaults to 0, min value of 0, max value of 500. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"max_input_tokens":{"type":"number","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. Input will be truncated according to the prompt_truncation parameter. Compatible Deployments: Cohere Platform"},"max_tokens":{"type":"number","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. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"message":{"type":"string","description":"Text input for the model to respond to. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments","required":true},"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. Compatible Deployments: Cohere Platform, Private Deployments"},"p":{"type":"number","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. Defaults to 0.75. min value of 0.01, max value of 0.99. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"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. The SYSTEM role is also used for the contents of the optional chat_history= parameter. When used with the ch"},"presence_penalty":{"type":"number","description":"Defaults to 0.0, min value of 0.0, max value of 1.0. 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. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker"},"prompt_truncation":{"type":"string","description":"Defaults to AUTO when connectors are specified and OFF in all other cases. Dictates how the prompt will be constructed. With 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 p"},"raw_prompting":{"type":"boolean","description":"When enabled, the user's prompt will be sent to the model without any pre-processing. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments","enum":[true,false]},"response_format":{"type":"object","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. The model can be forced into outputting JSON objects (with up to 5 levels of nesting","properties":{"type":{"type":"string","description":"Discriminator value: text","required":true},"schema":{"type":"object","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. Example (required name and age object): json { \"type\": \"object\", \"properties\": { \"name\": {\"type\": \"s"}}},"safety_mode":{"type":"string","description":"Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to CONTEXTUAL. When NONE is specified, the safety instruction will be omitted. Safety modes are not yet configurable in combination with tools, tool_results and documents parameters. Note: This paramete"},"search_queries_only":{"type":"boolean","description":"Defaults to false. When 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. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments","enum":[true,false]},"seed":{"type":"number","description":"If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"stop_sequences":{"type":"array","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. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/","items":{"type":"string"}},"stream":{"type":"boolean","description":"Defaults to false. When 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\". Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated. Compatible Deployments:","required":true,"enum":[true,false]},"temperature":{"type":"number","description":"Defaults to 0.3. A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations. Randomness can be further maximized by increasing the value of the p parameter. Compatible Deployments: Cohere Platform, Azure,"},"tool_results":{"type":"array","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. Each tool_result contains information about how it was invoked, as well as a list of outputs i","items":{"type":"object","properties":{"call":{"type":"object","description":"Contains the tool calls generated by the model. Use it to invoke your tools.","required":true},"outputs":{"type":"array","description":"Outputs","required":true}}}},"tools":{"type":"array","description":"A list of available tools (functions) that the model may suggest invoking before producing a text response. When 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 t","items":{"type":"object","properties":{"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.","required":true},"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.","required":true},"parameter_definitions":{"type":"string","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. { \"my_param\": { \"description\": <string>, \"type\": <string>, // any python data type, s"}}}}}},"example":{"chat_history":[],"citation_quality":"","connectors":[],"conversation_id":"","documents":[],"force_single_step":"","frequency_penalty":"","k":"","max_input_tokens":"","max_tokens":"","message":"","model":"","p":"","preamble":"","presence_penalty":"","prompt_truncation":"","raw_prompting":"","response_format":[{}],"safety_mode":"","search_queries_only":"","seed":"","stop_sequences":[],"stream":"","temperature":"","tool_results":[],"tools":[]}}}}}},"/v1/rerank":{"post":{"tags":["Rerank"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"documents":{"type":"array","description":"A list of document objects or strings to rerank. If a document is provided the text fields is required and all other fields will be preserved in the response. The total max chunks (length of documents max_chunks_per_doc) must be less than 10000. We recommend a maximum of 1,000 documents for optimal endpoint performance","required":true,"items":{"type":"object","properties":{}}},"max_chunks_per_doc":{"type":"number","description":"The maximum number of chunks to produce internally from a document"},"model":{"type":"string","description":"The identifier of the model to use, eg rerank-v3.5."},"query":{"type":"string","description":"The search query","required":true},"rank_fields":{"type":"array","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 ex","items":{"type":"string"}},"return_documents":{"type":"boolean","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. - 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 refer","enum":[true,false]},"top_n":{"type":"number","description":"The number of most relevant documents or indices to return, defaults to the length of the documents"}}},"example":{"documents":[],"max_chunks_per_doc":"","model":"","query":"","rank_fields":[],"return_documents":"","top_n":""}}}}}},"/v1/embed":{"post":{"tags":["Embed"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/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. Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If 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).","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"embedding_types":{"type":"array","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. \"float\": Use this when you want to get back the default float embeddings. Supported with all Embed models. \"int8\": Use this when you want to","items":{"type":"string"}},"images":{"type":"array","description":"An array of image data URIs for the model to embed. The 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. Image embeddings are supported with Embed v3.0 and newer models. For Embed v3.x mod","items":{"type":"string"}},"input_type":{"type":"string","description":"Specifies the type of input passed to the model. Required for embedding models v3 and higher. - \"search_document\": Used for embeddings stored in a vector database for search use-cases. - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents. - \"classification\": Used fo"},"model":{"type":"string","description":"ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed)."},"texts":{"type":"array","description":"An array of strings for the model to embed. Maximum number of texts per call is 96.","items":{"type":"string"}},"truncate":{"type":"string","description":"One of NONE|START|END to specify how the API will handle inputs longer than the maximum token length. Passing 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. If NONE is"}}},"example":{"embedding_types":[],"images":[],"input_type":"","model":"","texts":[],"truncate":""}}}}}},"/v1/tokenize":{"post":{"tags":["Tokenize"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"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.","required":true},"model":{"type":"string","description":"The input will be tokenized by the tokenizer that is used by this model.","required":true}}},"example":{"text":"","model":""}}}}}},"/v1/detokenize":{"post":{"tags":["Tokenize"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"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":true},"tokens":{"type":"array","description":"The list of tokens to be detokenized.","required":true,"items":{"type":"number"}}}},"example":{"model":"","tokens":[]}}}}}},"/v1/datasets":{"post":{"tags":["Datasets"],"parameters":[{"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":{"type":"string","example":""}},{"name":"csv_delimiter","in":"query","description":"The delimiter used for .csv uploads.","schema":{"type":"string","example":""}},{"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 requ","schema":{"type":"array","example":""}},{"name":"keep_original_file","in":"query","description":"Indicates if the original file should be stored.","schema":{"type":"boolean","example":"","items":{"type":"string","enum":[true,false]}}},{"name":"name","in":"query","description":"The name of the uploaded dataset.","required":true,"schema":{"type":"string","example":""}},{"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 requ","schema":{"type":"array","example":""}},{"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.","schema":{"type":"boolean","example":"","items":{"type":"string","enum":[true,false]}}},{"name":"text_separator","in":"query","description":"Raw .txt uploads will be split into entries using the text_separator value.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/datasets"},"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.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"data":{"type":"string","format":"binary","description":"The file to upload","required":true},"eval_data":{"type":"string","format":"binary","description":"An optional evaluation file to upload"}}},"example":{"data":"(binary)","eval_data":"(binary)"}}}}},"get":{"tags":["Datasets"],"parameters":[{"name":"after","in":"query","description":"optional filter after a date","schema":{"type":"string","example":""}},{"name":"before","in":"query","description":"optional filter before a date","schema":{"type":"string","example":""}},{"name":"datasetType","in":"query","description":"optional filter by dataset type","schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"optional limit to number of results","schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"optional offset to start of results","schema":{"type":"number","example":""}},{"name":"validationStatus","in":"query","description":"optional filter by validation status","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/datasets"},"summary":"List Datasets","description":"List datasets that have been created.","security":[{"bearerAuth":[]}]}},"/v1/datasets/usage":{"get":{"tags":["Datasets"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/datasets/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.","security":[{"bearerAuth":[]}]}},"/v1/datasets/{id}":{"get":{"tags":["Datasets"],"parameters":[{"name":"id","in":"path","description":"Id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/datasets/{id}"},"summary":"Get a Dataset","description":"Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information.","security":[{"bearerAuth":[]}]},"delete":{"tags":["Datasets"],"parameters":[{"name":"id","in":"path","description":"Id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/datasets/{id}"},"summary":"Delete a Dataset","description":"Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/models/{model}":{"get":{"tags":["Models"],"parameters":[{"name":"model","in":"path","description":"Model","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/models/{model}"},"summary":"Get a Model","description":"Returns the details of a model, provided its name.","security":[{"bearerAuth":[]}]}},"/v1/models":{"get":{"tags":["Models"],"parameters":[{"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.","schema":{"type":"boolean","example":"","items":{"type":"string","enum":[true,false]}}},{"name":"endpoint","in":"query","description":"When provided, filters the list of models to only those that are compatible with the specified endpoint.","schema":{"type":"string","example":""}},{"name":"page_size","in":"query","description":"Maximum number of models to include in a page Defaults to 20, min value of 1, max value of 1000.","schema":{"type":"number","example":""}},{"name":"page_token","in":"query","description":"Page token provided in the next_page_token field of a previous response.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/models"},"summary":"List Models","description":"Returns a list of models available for use.","security":[{"bearerAuth":[]}]}},"/v1/classify":{"post":{"tags":["Classify"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/classify"},"summary":"[Deprecated] 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. Note: [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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"examples":{"type":"array","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: \".","items":{"type":"object","properties":{"text":{"type":"string","description":"Text"},"label":{"type":"string","description":"Label"}}}},"inputs":{"type":"array","description":"A list of up to 96 texts to be classified. Each one must be a non-empty string. There 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 maxim","required":true,"items":{"type":"string"}},"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":{"type":"string","description":"One of NONE|START|END to specify how the API will handle inputs longer than the maximum token length. Passing 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. If NONE is"}}},"example":{"examples":[],"inputs":[],"model":"","preset":"","truncate":""}}}}}},"/v1/connectors":{"get":{"tags":["Connectors"],"parameters":[{"name":"limit","in":"query","description":"Maximum number of connectors to return [0, 100].","schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Number of connectors to skip before returning results [0, inf].","schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]},"post":{"tags":["Connectors"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"active":{"type":"boolean","description":"Whether the connector is active or not.","enum":[true,false]},"continue_on_failure":{"type":"boolean","description":"Whether a chat request should continue or not if the request to this connector fails.","enum":[true,false]},"description":{"type":"string","description":"A description of the connector."},"excludes":{"type":"array","description":"A list of fields to exclude from the prompt (fields remain in the document).","items":{"type":"string"}},"name":{"type":"string","description":"A human-readable name for the connector.","required":true},"oauth":{"type":"object","description":"Oauth","properties":{"authorize_url":{"type":"string","description":"The OAuth 2.0 /authorize endpoint to use when users authorize the connector."},"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."},"scope":{"type":"string","description":"The OAuth scopes to request when users authorize the connector."},"token_url":{"type":"string","description":"The OAuth 2.0 /token endpoint to use when users authorize the connector."}}},"service_auth":{"type":"object","description":"Service_auth","properties":{"type":{"type":"string","description":"The token_type specifies the way the token is passed in the Authorization header. Valid values are \"bearer\", \"basic\", and \"noscheme\".","required":true},"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":true}}},"url":{"type":"string","description":"The URL of the connector that will be used to search for documents.","required":true}}},"example":{"active":"","continue_on_failure":"","description":"","excludes":[],"name":"","oauth":[{}],"service_auth":[{}],"url":""}}}}}},"/v1/connectors/{id}":{"get":{"tags":["Connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to retrieve.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors/{id}"},"summary":"[Deprecated] Get a Connector","description":"Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]},"patch":{"tags":["Connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to update.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors/{id}"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"active":{"type":"boolean","description":"Active","enum":[true,false]},"continue_on_failure":{"type":"boolean","description":"Continue_on_failure","enum":[true,false]},"excludes":{"type":"array","description":"A list of fields to exclude from the prompt (fields remain in the document).","items":{"type":"string"}},"name":{"type":"string","description":"A human-readable name for the connector."},"oauth":{"type":"object","description":"Oauth","properties":{"authorize_url":{"type":"string","description":"The OAuth 2.0 /authorize endpoint to use when users authorize the connector."},"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."},"scope":{"type":"string","description":"The OAuth scopes to request when users authorize the connector."},"token_url":{"type":"string","description":"The OAuth 2.0 /token endpoint to use when users authorize the connector."}}},"service_auth":{"type":"object","description":"Service_auth","properties":{"type":{"type":"string","description":"The token_type specifies the way the token is passed in the Authorization header. Valid values are \"bearer\", \"basic\", and \"noscheme\".","required":true},"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":true}}},"url":{"type":"string","description":"The URL of the connector that will be used to search for documents."}}},"example":{"active":"","continue_on_failure":"","excludes":[],"name":"","oauth":[{}],"service_auth":[{}],"url":""}}}}},"delete":{"tags":["Connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to delete.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors/{id}"},"summary":"[Deprecated] Delete a Connector","description":"Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/connectors/{id}/oauth/authorize":{"post":{"tags":["Connectors"],"parameters":[{"name":"id","in":"path","description":"The ID of the connector to authorize.","required":true,"schema":{"type":"string","example":""}},{"name":"after_token_redirect","in":"query","description":"The URL to redirect to after the connector has been authorized.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/connectors/{id}/oauth/authorize"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/finetuning/finetuned-models":{"get":{"tags":["Fine-Tuning"],"parameters":[{"name":"order_by","in":"query","description":"Comma separated list of fields. For example: \"created_at,name\". The default sorting order is ascending. To specify descending order for a field, append \" desc\" to the field name. For example: \"created_at desc,name\". Supported sorting fields: - created_at (default)","schema":{"type":"string","example":""}},{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to 50.","schema":{"type":"number","example":""}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models"},"summary":"[Deprecated] Lists fine-tuned models.","description":"Returns a list of fine-tuned models that the user has access to. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]},"post":{"tags":["Fine-Tuning"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"completed_at":{"type":"string","description":"read-only. Timestamp for the completed fine-tuning."},"created_at":{"type":"string","description":"read-only. Creation timestamp."},"creator_id":{"type":"string","description":"read-only. User ID of the creator."},"id":{"type":"string","description":"read-only. FinetunedModel ID."},"last_used":{"type":"string","description":"read-only. Deprecated: Timestamp for the latest request to this fine-tuned model."},"name":{"type":"string","description":"FinetunedModel name (e.g. foobar).","required":true},"organization_id":{"type":"string","description":"read-only. Organization ID."},"settings":{"type":"object","description":"The configuration used for fine-tuning.","required":true,"properties":{"base_model":{"type":"object","description":"The base model used for fine-tuning.","required":true},"dataset_id":{"type":"string","description":"The data used for training and evaluating the fine-tuned model.","required":true},"hyperparameters":{"type":"object","description":"The fine-tuning hyperparameters."},"multi_label":{"type":"boolean","description":"read-only. Whether the model is single-label or multi-label (only for classification).","enum":[true,false]},"wandb":{"type":"object","description":"The Weights & Biases configuration."}}},"status":{"type":"string","description":"The possible stages of a fine-tuned model life-cycle. - STATUS_UNSPECIFIED: Unspecified status. - STATUS_FINETUNING: The fine-tuned model is being fine-tuned. - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed. - STATUS_READY: The fine-tuned model is ready to receive requests. - STATUS_FAILED: T"},"updated_at":{"type":"string","description":"read-only. Latest update timestamp."}}},"example":{"completed_at":"","created_at":"","creator_id":"","id":"","last_used":"","name":"","organization_id":"","settings":[{}],"status":"","updated_at":""}}}}}},"/v1/finetuning/finetuned-models/{id}":{"patch":{"tags":["Fine-Tuning"],"parameters":[{"name":"id","in":"path","description":"FinetunedModel ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models/{id}"},"summary":"[Deprecated] 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. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"completed_at":{"type":"string","description":"Timestamp for the completed fine-tuning."},"created_at":{"type":"string","description":"Creation timestamp."},"creator_id":{"type":"string","description":"User ID of the creator."},"last_used":{"type":"string","description":"Deprecated: Timestamp for the latest request to this fine-tuned model."},"name":{"type":"string","description":"FinetunedModel name (e.g. foobar).","required":true},"organization_id":{"type":"string","description":"Organization ID."},"settings":{"type":"object","description":"The configuration used for fine-tuning.","required":true,"properties":{"base_model":{"type":"object","description":"The base model used for fine-tuning.","required":true},"dataset_id":{"type":"string","description":"The data used for training and evaluating the fine-tuned model.","required":true},"hyperparameters":{"type":"object","description":"The fine-tuning hyperparameters."},"multi_label":{"type":"boolean","description":"read-only. Whether the model is single-label or multi-label (only for classification).","enum":[true,false]},"wandb":{"type":"object","description":"The Weights & Biases configuration."}}},"status":{"type":"string","description":"The possible stages of a fine-tuned model life-cycle. - STATUS_UNSPECIFIED: Unspecified status. - STATUS_FINETUNING: The fine-tuned model is being fine-tuned. - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed. - STATUS_READY: The fine-tuned model is ready to receive requests. - STATUS_FAILED: T"},"updated_at":{"type":"string","description":"Latest update timestamp."}}},"example":{"completed_at":"","created_at":"","creator_id":"","last_used":"","name":"","organization_id":"","settings":[{}],"status":"","updated_at":""}}}}},"get":{"tags":["Fine-Tuning"],"parameters":[{"name":"id","in":"path","description":"The fine-tuned model ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models/{id}"},"summary":"[Deprecated] Returns a fine-tuned model by ID.","description":"Retrieve a fine-tuned model by its ID. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]},"delete":{"tags":["Fine-Tuning"],"parameters":[{"name":"id","in":"path","description":"The fine-tuned model ID.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models/{id}"},"summary":"[Deprecated] 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. This operation is irreversible. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/events":{"get":{"tags":["Fine-Tuning"],"parameters":[{"name":"finetuned_model_id","in":"path","description":"The parent fine-tuned model ID.","required":true,"schema":{"type":"string","example":""}},{"name":"order_by","in":"query","description":"Comma separated list of fields. For example: \"created_at,name\". The default sorting order is ascending. To specify descending order for a field, append \" desc\" to the field name. For example: \"created_at desc,name\". Supported sorting fields: - created_at (default)","schema":{"type":"string","example":""}},{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to 50.","schema":{"type":"number","example":""}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models/{finetuned_model_id}/events"},"summary":"[Deprecated] 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. The events are ordered by creation time, with the most recent event first. The list can be paginated using page_size and page_token parameters. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics":{"get":{"tags":["Fine-Tuning"],"parameters":[{"name":"finetuned_model_id","in":"path","description":"The parent fine-tuned model ID.","required":true,"schema":{"type":"string","example":""}},{"name":"page_size","in":"query","description":"Maximum number of results to be returned by the server. If 0, defaults to 50.","schema":{"type":"number","example":""}},{"name":"page_token","in":"query","description":"Request a specific page of the list results.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics"},"summary":"[Deprecated] Retrieve training metrics for fine-tuned models.","description":"Returns a list of metrics measured during the training of a fine-tuned model. The metrics are ordered by step number, with the most recent step first. The list can be paginated using page_size and page_token parameters. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}]}},"/v1/generate":{"post":{"tags":["Generate"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/generate"},"summary":"[Deprecated] Generate","description":"<Warning> This 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. </Warning> Generates realistic text conditioned on a given input. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"end_sequences":{"type":"array","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.","items":{"type":"string"}},"frequency_penalty":{"type":"number","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. Using frequency_penalty in combination with presence_penalty is not supported on newer mod"},"k":{"type":"number","description":"Ensures only the top k most likely tokens are considered for generation at each step. Defaults to 0, min value of 0, max value of 500."},"max_tokens":{"type":"number","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. This 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 mor"},"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). Smaller, \"light\" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-cust"},"num_generations":{"type":"number","description":"The maximum number of generations that will be returned. Defaults to 1, min value of 1, max value of 5."},"p":{"type":"number","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. Defaults to 0.75. min value of 0.01, max value of 0.99."},"presence_penalty":{"type":"number","description":"Defaults to 0.0, min value of 0.0, max value of 1.0. Can 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. Using frequency_penalty in combination with presence_p"},"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). When a preset is specified, the prompt parameter becomes optional, and any included parameters will override the preset's"},"prompt":{"type":"string","description":"The input text that serves as the starting point for generating the response. Note: The prompt will be pre-processed and modified before reaching the model.","required":true},"raw_prompting":{"type":"boolean","description":"When enabled, the user's prompt will be sent to the model without any pre-processing.","enum":[true,false]},"return_likelihoods":{"type":"string","description":"One of GENERATION|NONE to specify how and if the token likelihoods are returned with the response. Defaults to NONE. If GENERATION is selected, the token likelihoods will only be provided for generated text. WARNING: ALL is deprecated, and will be removed in a future release."},"seed":{"type":"number","description":"If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments"},"stop_sequences":{"type":"array","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.","items":{"type":"string"}},"stream":{"type":"boolean","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. The final event will contain the complete response, and will contain an is_finished field set to true. The event will also contain a finish_","required":true,"enum":[true,false]},"temperature":{"type":"number","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. Defaults to 0.75, min value of 0.0, max value of 5.0."},"truncate":{"type":"string","description":"One of NONE|START|END to specify how the API will handle inputs longer than the maximum token length. Passing 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. If NONE is"}}},"example":{"end_sequences":[],"frequency_penalty":"","k":"","max_tokens":"","model":"","num_generations":"","p":"","presence_penalty":"","preset":"","prompt":"","raw_prompting":"","return_likelihoods":"","seed":"","stop_sequences":[],"stream":"","temperature":"","truncate":""}}}}}},"/v1/summarize":{"post":{"tags":["Summarize"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/summarize"},"summary":"[Deprecated] Summarize","description":"<Warning> This 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. </Warning> Generates a summary in English for a given text. (The provider marks this operation as deprecated.)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"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.","required":true},"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\""},"extractiveness":{"type":"string","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"},"format":{"type":"string","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."},"length":{"type":"string","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."},"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."},"temperature":{"type":"number","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."}}},"example":{"text":"","additional_command":"","extractiveness":"","format":"","length":"","model":"","temperature":""}}}}}},"/v1/check-api-key":{"post":{"tags":["API Keys"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.cohere.com/reference","api_endpoint":"https://api.cohere.com/v1/check-api-key"},"summary":"Check API key","description":"Checks that the api key in the Authorization header is valid and active","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}