---
title: "Create embeddings (Cohere v2 format)"
method: POST
path: "/cohere/v2/embed"
tags: ["Cohere Integration"]
---

# Create embeddings (Cohere v2 format)

`POST /cohere/v2/embed`

Creates embeddings using Cohere v2 API format.

## Request body

- CohereEmbeddingRequest
  - `model` string, required — ID of an available embedding model
  - `input_type` string, required — Specifies the type of input passed to the model. Required for embedding models v3 and higher.
  - `texts` string[] — Array of strings to embed. Maximum 96 texts per call. At least one of texts, images, or inputs is required.
  - `images` string[] — Array of image data URIs for multimodal embedding. Maximum 1 image per call. Supports JPEG, PNG, WebP, GIF up to 5MB.
  - `inputs` object[] — Array of mixed text/image components for embedding. Maximum 96 per call.
    - `content` object[] — Array of content blocks (reuses chat content blocks)
      - `type` 'text' | 'image_url' | 'thinking' | 'document', required
      - `text` string
      - `image_url` object
        - `url` string
      - `thinking` string
      - `document` object
        - `data` object
        - `id` string
  - `embedding_types` string[] — Specifies the return format types (float, int8, uint8, binary, ubinary, base64). Defaults to float if unspecified.
  - `output_dimension` integer — Number of dimensions for output embeddings (256, 512, 1024, 1536). Available only for embed-v4 and newer models.
  - `max_tokens` integer — Maximum tokens to embed per input before truncation.
  - `truncate` string — Handling for inputs exceeding token limits. Defaults to END.

## Response `200`

Successful response

- CohereEmbeddingResponse
  - `id` string — Response ID
  - `embeddings` object — Embedding data object with different types
    - `float` array[] — Float embeddings
      - number[]
    - `int8` array[] — Int8 embeddings
      - integer[]
    - `uint8` array[] — Uint8 embeddings
      - integer[]
    - `binary` array[] — Binary embeddings
      - integer[]
    - `ubinary` array[] — Unsigned binary embeddings
      - integer[]
    - `base64` string[] — Base64-encoded embeddings
  - `response_type` string — Response type (embeddings_floats, embeddings_by_type)
  - `texts` string[] — Original text entries
  - `images` object[] — Original image entries
    - `width` integer — Width in pixels
    - `height` integer — Height in pixels
    - `format` string — Image format
    - `bit_depth` integer — Bit depth
  - `meta` object — Metadata in embedding response
    - `api_version` object — API version information
      - `version` string — API version
      - `is_deprecated` boolean — Deprecation status
      - `is_experimental` boolean — Experimental status
    - `billed_units` object
      - `input_tokens` integer — Number of billed input tokens
      - `output_tokens` integer — Number of billed output tokens
      - `search_units` integer — Number of billed search units
      - `classifications` integer — Number of billed classification units
    - `tokens` object
      - `input_tokens` integer — Number of input tokens used
      - `output_tokens` integer — Number of output tokens produced
    - `warnings` string[] — Any warnings

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
