Create embeddings
curl "$CCSIO_BASE_URL/embeddings" \
-H "Authorization: Bearer $CCSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen3-embedding-0.6b", "input": ["The cat sleeps.", "A kitten is napping."]}'JSON
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0458, 0.0871, 0.0032] },
{ "object": "embedding", "index": 1, "embedding": [0.0119, -0.0441, 0.0902, 0.0047] }
],
"model": "qwen3-embedding-0.6b",
"usage": { "prompt_tokens": 12, "completion_tokens": 0, "total_tokens": 12 }
}qwen3-embedding-0.6b returns 1024 numbers per input.Input
input takes the forms of OpenAI's API: a string, an array of strings, an array of token ids, or an array of arrays of token ids. Send many texts in one call rather than one call per text: it is faster and counts the same tokens.
Dimensions
dimensions is passed to the model. Use the same model and dimensions for the texts you store and the queries you compare them with.