Nexus

Cohere

Use Cohere Command and Embed models with Nexus — native embeddings with input types.

The Cohere provider connects to the Cohere v2 Chat API. It has a custom API format with native embedding support including input_type fields.

Installation

import "github.com/xraph/nexus/providers/cohere"

Quick Start

provider := cohere.New(os.Getenv("COHERE_API_KEY"))

gw := nexus.New(
    nexus.WithProvider(provider),
)

Options

OptionDescription
cohere.WithBaseURL(url)Override the API base URL (default: https://api.cohere.com)

Capabilities

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsYes
VisionNo
ToolsYes
ThinkingNo

Models

ModelContextMax OutputInput PriceOutput Price
command-r-plus128K4,096$2.50/M$10.00/M
command-r128K4,096$0.15/M$0.60/M
command-light4,0964,096$0.30/M$0.60/M
embed-v4.0512$0.10/M
embed-multilingual-v3.0512$0.10/M

On this page