Create embedding
Generate vector representations of text. Supports multiple embedding providers.
ApiKeyAuthAuthorization<token>application/json- body
dimensions?integerThe number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
1 <= valueencoding_format?stringThe format to return the embeddings in. Can be either float or base64.
"float""float""base64"input*|array<>|array<integer>|array<array<integer>>Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
model*|ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
user?stringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Successful response
application/json- response
data*array<>The list of embeddings generated by the model.
model*stringThe name of the model used to generate the embedding.
object*"list"The object type, which is always "list".
"list"usage*What this request cost. All amounts are in Credits, not USD.
provider?stringThe provider that served the request.
curl -X POST 'https://api.ohmygpt.com/v1/embeddings' \ -H 'Content-Type: application/json' \ -d '{ "input": "", "model": "string"}'{ "data": [ { "embedding": [ 0.1 ], "index": 0, "object": "embedding" } ], "model": "string", "object": "list", "provider": "string", "usage": { "prompt_tokens": 0, "total_tokens": 0, "billing_mode": "platform", "cost": 0, "is_byok": true }}List stored responses GET
Lists stored responses owned by the authenticated user, newest first. Deleted responses are excluded; every stored status is returned. Use `after` with the previous page's `last_id` to page backwards.
Retrieve model GET
Returns detailed information about a specific model. Model IDs use the `{creator}/{model}` form, so clients must send both path segments, for example `/v1/models/openai/gpt-4o`.