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 }}Send a message to the OhMyGPT team POST
Sends a sales inquiry, or a request for a catalog model that is not available yet, to [email protected]. A 202 response means the message is stored and will be delivered; it does not need to be sent again. Replies go to the email address in the message. Limited to a few messages per minute per IP address.
Create image POST
Generate images from a text prompt. Image models are billed per image or per token, as listed in each model's pricing.