v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
Cohere Integration

Chat with model (Cohere v2 format)

Sends a chat request using Cohere v2 API format.

post/cohere/v2/chat

Request body

modelstring required

Model to use for chat completion

tool_choice'AUTO' | 'NONE' | 'REQUIRED'

Tool choice mode - AUTO lets the model decide, NONE disables tools, REQUIRED forces tool use

temperaturenumber
pnumber

Top-p sampling

kinteger

Top-k sampling

max_tokensinteger
stop_sequencesstring[]
frequency_penaltynumber
presence_penaltynumber
streamboolean
safety_mode'CONTEXTUAL' | 'STRICT' | 'NONE'
log_probsboolean
strict_tool_choiceboolean

Example request

{
  "model": "command-r-plus"
}

Response

Successful response

idstring
finish_reason'COMPLETE' | 'STOP_SEQUENCE' | 'MAX_TOKENS' | 'TOOL_CALL' | 'ERROR' | 'TIMEOUT'