Skip to content

Cohere

<dependency>
<groupId>com.google.genkit</groupId>
<artifactId>genkit-plugin-cohere</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
Terminal window
export COHERE_API_KEY=your-api-key
import com.google.genkit.plugins.cohere.CoherePlugin;
Genkit genkit = Genkit.builder()
.plugin(CoherePlugin.create())
.build();
ModelResponse response = genkit.generate(
GenerateOptions.builder()
.model("cohere/command-a-03-2025")
.prompt("Tell me about AI")
.build());
  • cohere/command-a-plus-05-2026 — flagship (Mixture-of-Experts, text + vision)
  • cohere/command-a-reasoning-08-2025
  • cohere/command-a-vision-07-2025
  • cohere/command-a-03-2025
  • cohere/command-r7b-12-2024
  • cohere/command-r-08-2024
  • cohere/command-r-plus-08-2024

Cohere embedding models are available through the OpenAI-compatible endpoint:

  • cohere/embed-v4.0
  • cohere/embed-multilingual-v3.0
  • cohere/embed-english-v3.0
EmbedResponse response = genkit.embed("cohere/embed-v4.0", documents);
  • Text generation, tool calling, RAG support, SSE streaming, embeddings

See the cohere sample.