OpenAI Embeddings API
POSThttps://api.acedata.cloud/openai/embeddings
POSThttps://api.acedata.cloud/v1/embeddings

OpenAI Embeddings API for generating text vector representations.

Request Headers

acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token

Request Body

inputstringRequired parameter
Input content to be embedded: It can be a single string, an array of strings, or an array of tokens.
modelstringRequired parameter
The ID of the embedding model to be used (for example, `text-embedding-3-small`, `text-embedding-3-large`).
dimensionsinteger
Optional, specify the number of dimensions for the output embedding vectors, effective only on models that support this parameter (such as `text-embedding-3-small`, `text-embedding-3-large`).
encoding_formatstring
Return the encoding format of the embedding vector, supporting `float` (array of floating-point numbers) and `base64` (Base64 string).
Please select

Response

OpenAI generation
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.