开发者文档

从这些内容开始

搜索标题与正文↑ ↓ 选择 · Enter 打开 · Esc 关闭

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

ParameterTypeRequiredDescription
modelstringYesEmbedding model ID.
inputstring or arrayYesText or list of text values to embed.
encoding_formatstringNoUsually float or base64.
dimensionsintegerNoOptional output dimension for supported models.
userstringNoEnd-user identifier.

Example

bash
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:

FieldDescription
data[].embeddingNumeric vector.
data[].indexInput index.
usage.total_tokensToken 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.
Embeddings · uouo cloud