Cohere integration (AI). Imported from open-connector.
https://api.cohere.com/v2/chat
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | The name of a compatible Cohere chat model. |
| messages | array | required | The ordered conversation messages to send to Cohere. |
| tools | array | optional | Function tools available to the model. |
| strict_tools | boolean | optional | Whether tool calls must strictly follow the tool definition. |
| documents | array | optional | Documents that the model can cite while generating the response. |
| citation_options | object | optional | A JSON object accepted or returned by the Cohere API. |
| response_format | object | optional | A JSON object accepted or returned by the Cohere API. |
| safety_mode | string | optional | The Cohere safety mode to use for the request. |
| max_tokens | integer | optional | The maximum number of output tokens the model will generate. |
| stop_sequences | array | optional | Stop sequences that halt generation. |
| temperature | number | optional | Randomness used for generation. |
| seed | integer | optional | A best-effort deterministic sampling seed. |
| frequency_penalty | number | optional | Penalty used to reduce repeated tokens. |
| presence_penalty | number | optional | Penalty used to reduce reused token content. |
| k | integer | optional | Top-k sampling value. Use 0 to disable k-sampling. |
| p | number | optional | Top-p sampling value. |
| logprobs | boolean | optional | Whether to include generated-token log probabilities. |
| tool_choice | string | optional | Tool selection behavior for the model. |
| thinking | object | optional | A JSON object accepted or returned by the Cohere API. |
| priority | integer | optional | Lower values are handled earlier by Cohere. |
/v2/embed
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | The Cohere embedding model identifier. |
| input_type | string | required | The type of input passed to the embedding model. |
| texts | array | required | Text strings for the model to embed. |
| max_tokens | integer | optional | The maximum number of tokens to embed per input. |
| output_dimension | integer | optional | The number of dimensions for embed-v4 and newer models. |
| embedding_types | array | optional | Embedding representations to return. |
| truncate | string | optional | How Cohere handles inputs longer than the model limit. |
| priority | integer | optional | Lower values are handled earlier by Cohere. |
/v2/rerank
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | The Cohere rerank model identifier. |
| query | string | required | The search query used to rank documents. |
| documents | array | required | Texts that will be compared to the query. |
| top_n | integer | optional | Maximum number of rerank results to return. |
| max_tokens_per_doc | integer | optional | Maximum tokens to keep per document before ranking. |
| priority | integer | optional | Lower values are handled earlier by Cohere. |