MarketSupport← Back to app

Embeddings API

Turn text into vector embeddings for semantic search, RAG, clustering and classification. Embeddings are served through Cohere and billed from your credit balance by input tokens.

Overview

Send one or more strings and get back a float vector per input. Unlike generation, this is a single synchronous call — no task polling.

Authentication

Create an API key at /api-keys, then send it as a Bearer token.

Authorization: Bearer <YOUR_API_KEY>

Create Embeddings

POST
POST https://97ai.97claude.com/api/embeddings
cURL
curl -X POST "https://97ai.97claude.com/api/embeddings" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "embed/embed-4.0",
    "input": ["hello world", "a second document"],
    "input_type": "search_document"
  }'

Parameters

model string required

Embedding model slug, e.g. embed/embed-4.0.

input string | string[] required

One text, or an array of up to 96 texts.

input_type string optional

search_document (default), search_query, classification or clustering.

Response

JSON
{
  "model": "embed/embed-4.0",
  "embeddings": [[0.0123, -0.0456, ...], [0.0789, ...]],
  "tokens": 12,
  "credits": 1,
  "balance": 9998
}
Billing
Charged by input tokens × the model rate × the platform markup, rounded up (minimum 1 credit per request).

Models

ModelProviderslugPrice
Cohere Embed 4.0Cohereembed/embed-4.0$0.12 / 1M tokens