> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel.enterpilot.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cohere

> Configure Cohere in GoModel and use Command chat, tool calling, reasoning, image input, audio transcription, and Embed models through OpenAI-compatible APIs.

GoModel translates OpenAI-compatible Chat Completions, Responses, Embeddings,
and Audio Transcription requests to Cohere's native v2 API. Model
discovery uses Cohere's model catalog and exposes chat, embedding, and
transcription models through `/v1/models`.

## Configure

```bash theme={null}
COHERE_API_KEY=...
# COHERE_BASE_URL=https://api.cohere.com   # optional override
```

Or in `config.yaml`:

```yaml theme={null}
providers:
  cohere:
    type: cohere
    api_key: "${COHERE_API_KEY}"
```

Multiple keys use the standard `COHERE_API_KEY_2`,
`COHERE_API_KEY_3`, ... rotation convention. You can restrict or supplement
model discovery with `COHERE_MODELS`.

## Chat and Responses

Use a Cohere Command model with either OpenAI-compatible endpoint:

```bash theme={null}
curl http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer $GOMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "command-a-plus-05-2026",
    "messages": [{"role": "user", "content": "Explain vector search briefly"}]
  }'
```

Chat streaming, system and developer messages, image URL parts, JSON response
formats, tool definitions, tool calls, and tool results are translated to the
Cohere v2 format. `/v1/responses` uses the same chat adapter.

Cohere reasoning models enable thinking by default. To control Cohere's native
reasoning behavior, include its `thinking` object as an extension:

```json theme={null}
{
  "model": "command-a-reasoning-08-2025",
  "messages": [{"role": "user", "content": "Solve this carefully..."}],
  "thinking": {"type": "enabled", "token_budget": 4000}
}
```

Thinking output is returned as the OpenAI-compatible `reasoning_content`
extension in both normal and streaming responses.

## Audio transcription

Cohere audio uses a dedicated speech-to-text model and endpoint; Command chat
models do not accept audio content mixed into Chat Completions or Responses.
Transcribe audio through the OpenAI-compatible endpoint:

```bash theme={null}
curl http://localhost:8080/v1/audio/transcriptions \
  -H "Authorization: Bearer $GOMODEL_API_KEY" \
  -F "model=cohere/cohere-transcribe-03-2026" \
  -F "language=en" \
  -F "response_format=json" \
  -F "file=@recording.wav"
```

The Cohere transcription API requires `language` and returns JSON. GoModel
accepts the OpenAI-compatible `response_format=json` field but omits it from the
native request because JSON is Cohere's fixed response format. Cohere does not
support text-to-speech, prompt hints, timestamp granularities, or streaming
transcription.

## Embeddings

GoModel supplies Cohere's required embedding fields while retaining the
OpenAI request shape:

```bash theme={null}
curl http://localhost:8080/v1/embeddings \
  -H "Authorization: Bearer $GOMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "embed-v4.0",
    "input": ["first document", "second document"],
    "dimensions": 1024,
    "input_type": "search_document"
  }'
```

`input_type` defaults to `search_document`. Set it to `search_query`,
`classification`, or `clustering` when that better describes the input.
`encoding_format` supports `float` (the default) and `base64`. Cohere-native
`truncate`, `max_tokens`, and `priority` fields are also passed through.

## Native passthrough

Add `cohere` to `server.enabled_passthrough_providers`, then use paths such as
`/p/cohere/v2/chat` or `/p/cohere/v2/rerank` to call Cohere-native APIs that do
not have an OpenAI-compatible GoModel surface.

See Cohere's [Chat API](https://docs.cohere.com/reference/chat),
[Embed API](https://docs.cohere.com/reference/embed),
[Audio Transcription API](https://docs.cohere.com/reference/create-audio-transcription),
and [reasoning guide](https://docs.cohere.com/docs/reasoning) for native fields
and model-specific capabilities.
