AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Embeddings

OpenAI Embeddings

Create OpenAI-compatible text embeddings.

The OpenAI Embeddings API converts one or more inputs into vector representations for semantic search, clustering, recommendations, and vector retrieval. Input limits, output dimensions, and optional parameters depend on the selected embedding model.

POST/v1/embeddings

Create vector representations for semantic search, clustering, recommendations, and other retrieval workflows. The API accepts a single text input, a batch of text inputs, a token array, or a batch of token arrays.

Input limits and output dimensions depend on the selected model. For example, text-embedding-ada-002 returns 1,536-dimensional vectors and accepts up to 8,192 tokens; other models may use different limits.

Authorization

bearerAuth
AuthorizationBearer <token>

Use Bearer your-api-key in the Authorization Header.

In: header

Request Body

Choose a text structure based on the number of inputs. Both views use the same Embeddings endpoint.

application/json
Single text

Convert one non-empty string into an embedding vector for single-item tests or real-time queries.

model
An embedding model ID visible to the current API key.
input
A single non-empty string to convert into a vector.
encoding_format
Vector encoding format. The default is float.
application/json
{
  "model": "MODEL_ID",
  "input": "The food was delicious and the waiter was friendly.",
  "encoding_format": "float"
}
Complete field referenceIncludes single and batch input structures for both text and tokens.

Token arrays and batched token arrays remain available in the complete field reference. Input count, length, and vector dimensions depend on the selected model limits.

Response Body

application/json

application/json

application/json

application/json

application/json