oneAI icon

oneAI

Interact with the oneAI API

AI → Create Embedding

AI-generated

Summary

Generates vector embeddings for text inputs using specified OpenAI-compatible models.

Inputs

  • Model (required) — The embedding model ID to use (e.g., text-embedding-3-small, text-embedding-3-large).
  • Input Mode — Embed a single piece of text (single) or an array of texts in one request (batch).
  • Text — The text to embed (required when Input Mode is Single).
  • Texts (JSON Array) — JSON array of strings to embed (required when Input Mode is Batch).
  • Additional Options — Additional options, including Encoding Format (float or base64) to control the output representation of the embedding vector.

Output shape

a list of items where each item contains a JSON object with a field for the embedding vector.

The output shape varies by input mode: Single text produces one item; Batch mode produces one item per text in the array.

Examples

Example 1: Embed a single paragraph of text.

Set Input Mode to Single Text, provide the text content, and use the default float encoding.

Example 2: Process multiple documents at once.

Set Input Mode to Multiple Texts, provide a JSON array of document strings, and optionally specify base64 encoding for compact storage.

Links

Discussion