API ReferenceGeneratedEmbeddings
创建文本嵌入
将文本转换为向量嵌入
Authorization
BearerAuth AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/embeddings" \ -H "Content-Type: application/json" \ -d '{ "model": "text-embedding-ada-002", "input": "string" }'{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [ 0 ] } ], "model": "string", "usage": { "prompt_tokens": 0, "total_tokens": 0 }}