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/embeddingscURL
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 requiredEmbedding model slug, e.g. embed/embed-4.0.
input string | string[] requiredOne text, or an array of up to 96 texts.
input_type string optionalsearch_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
| Model | Provider | slug | Price |
|---|---|---|---|
| Cohere Embed 4.0 | Cohere | embed/embed-4.0 | $0.12 / 1M tokens |