← Tools Reference

Cohere

Cohere integration (AI). Imported from open-connector.

API key3 toolshttps://api.cohere.com
POST
cohere_chat
Generate a synchronous text response using the Cohere Chat API.

/v2/chat

20 parameters
ParamTypeRequiredDescription
modelstringrequiredThe name of a compatible Cohere chat model.
messagesarrayrequiredThe ordered conversation messages to send to Cohere.
toolsarrayoptionalFunction tools available to the model.
strict_toolsbooleanoptionalWhether tool calls must strictly follow the tool definition.
documentsarrayoptionalDocuments that the model can cite while generating the response.
citation_optionsobjectoptionalA JSON object accepted or returned by the Cohere API.
response_formatobjectoptionalA JSON object accepted or returned by the Cohere API.
safety_modestringoptionalThe Cohere safety mode to use for the request.
max_tokensintegeroptionalThe maximum number of output tokens the model will generate.
stop_sequencesarrayoptionalStop sequences that halt generation.
temperaturenumberoptionalRandomness used for generation.
seedintegeroptionalA best-effort deterministic sampling seed.
frequency_penaltynumberoptionalPenalty used to reduce repeated tokens.
presence_penaltynumberoptionalPenalty used to reduce reused token content.
kintegeroptionalTop-k sampling value. Use 0 to disable k-sampling.
pnumberoptionalTop-p sampling value.
logprobsbooleanoptionalWhether to include generated-token log probabilities.
tool_choicestringoptionalTool selection behavior for the model.
thinkingobjectoptionalA JSON object accepted or returned by the Cohere API.
priorityintegeroptionalLower values are handled earlier by Cohere.
POST
cohere_embed_texts
Generate embeddings for text inputs using the Cohere Embed API.

/v2/embed

8 parameters
ParamTypeRequiredDescription
modelstringrequiredThe Cohere embedding model identifier.
input_typestringrequiredThe type of input passed to the embedding model.
textsarrayrequiredText strings for the model to embed.
max_tokensintegeroptionalThe maximum number of tokens to embed per input.
output_dimensionintegeroptionalThe number of dimensions for embed-v4 and newer models.
embedding_typesarrayoptionalEmbedding representations to return.
truncatestringoptionalHow Cohere handles inputs longer than the model limit.
priorityintegeroptionalLower values are handled earlier by Cohere.
POST
cohere_rerank_documents
Rank text documents by relevance to a query using the Cohere Rerank API.

/v2/rerank

6 parameters
ParamTypeRequiredDescription
modelstringrequiredThe Cohere rerank model identifier.
querystringrequiredThe search query used to rank documents.
documentsarrayrequiredTexts that will be compared to the query.
top_nintegeroptionalMaximum number of rerank results to return.
max_tokens_per_docintegeroptionalMaximum tokens to keep per document before ranking.
priorityintegeroptionalLower values are handled earlier by Cohere.