Create embeddings
Turn text or token ids into vectors. The answer is one JSON body; it never streams. A request fails over only to another endpoint serving the same model, so the vectors stay in one space.
bearerAuthAuthorizationBearer <token>Your API key, sent as Authorization: Bearer <key>.
Idempotency-Key?stringAny string you choose. A retry with the same key and body returns the first result instead of running again. The same key with a different body is a 409 idempotency_conflict.
application/json- body
model*stringinput*|array<string>|array<integer>|array<array<integer>>A string, an array of strings, an array of token ids, or an array of token-id arrays. Nothing in it may be empty.
encoding_format?string"float""float""base64"dimensions?integerSupported by some models only.
1 <= valueOne vector per input, in input order.
application/json- response
id?stringobject?stringmodel?stringprovider?stringThe provider that served the request.
data?array<>usage?curl -X POST "https://example.com/v1/embeddings" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen/qwen3-embedding-8b", "input": [ "The food was delicious.", "The service was slow." ] }'{ "id": "string", "object": "list", "model": "string", "provider": "string", "data": [ { "object": "embedding", "index": 0, "embedding": [ 0 ] } ], "usage": { "prompt_tokens": 0, "total_tokens": 0 }}Create a chat completion POST
Send a conversation and get a reply. Set `stream` to true for server-sent events. A request can fail over to another endpoint only before the first content token; after that the stream ends with a terminal frame instead.
Generate an image POST
Submit an image job. The answer is always a job resource, even when the image is ready at once.