API
Embeddings
Create vector embeddings for search, clustering, retrieval, and ranking workflows.
Overview
Embeddings convert text into numeric vectors that can be stored in a vector database or used for semantic comparison.
Request
`POST https://uouo.cloud/v1/embeddings`
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Embedding model ID. |
| input | string or array | Yes | Text or list of text values to embed. |
| encoding_format | string | No | Usually `float` or `base64`. |
| dimensions | integer | No | Optional output dimension for supported models. |
| user | string | No | End-user identifier. |
Example
curl https://uouo.cloud/v1/embeddings \
-H "Authorization: Bearer $UOUODUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": ["Gateway documentation", "Vector search example"]
}'Response
The response contains one embedding object for each input item:
| Field | Description |
|---|---|
| data[].embedding | Numeric vector. |
| data[].index | Input index. |
| usage.total_tokens | Token count billed for the request. |
Notes
- Keep input chunks short enough for your vector database and retrieval strategy.
- Use the same embedding model for indexing and querying.
- Batch inputs to reduce request overhead, but avoid very large payloads.