Text embeddings
OpenAI-compatible string or string-array input. Batches return one vector per string, in order; up to 128 strings.
CN model: volcengine/doubao-embedding-vision-251215 (alias volcengine/doubao-embedding-vision).
SG model: volcengine-overseas/skylark-embedding-vision-251215.
Text and visual input tokens are billed separately using actual upstream usage and account discounts.
Prices are available through authenticated GET /v1/models; visual rate is embedding_visual_input_per_1m.
No output token charge. Malformed/failed upstream responses release the reservation.
Legacy doubao-embedding and doubao-embedding-large are unavailable; vector spaces differ and existing indexes must be rebuilt when changing models.
/api/v3, /v3, /api/v1 prefixes are also supported. Streaming and pre-tokenized integer input are unsupported.
Authorization
BearerAuth API key authentication (OpenAI format). Pass in the Authorization header:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X post "https://api.xrtoken.ai/v1/embeddings" \ -H "Content-Type: application/json" \ -d '{ "model": "volcengine-overseas/skylark-embedding-vision-251215", "input": [ "semantic search", "vector retrieval" ] }'{
"model": "string",
"object": "string",
"data": [
{}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0,
"prompt_tokens_details": {}
}
}