1. Embeddings
AboAI
English
  • ไธญๆ–‡
  • English
  • Home Page
  • AboAi-API
    • Model
      • Native OpenAI Format
      • Native Gemini Format
    • Chat
      • Native OpenAI Format
      • Native Gemini Format
      • Native Claude Format
      • Responses Request (openai)
    • Audio
      • Native OpenAI Format TTS
      • Native Gemini Format TTS
    • Images
      • Native OpenAI Format Image Generation
      • Native Gemini Format Image Generation
      • Native OpenAI Format Image Editing (JSON)
      • Native OpenAI Format Image Editing (Multipart)
    • Video
      • Seedance2.0 format
        • Create Video Generation Task
        • Query Video Generation Task Status
    • Vector
      • Embeddings
        • Create Embedding
          POST
    • Translation
      • Speech Translation
  • AI application
    • AboAI API Integration with Claude Code
    • AboAI API Integration with Cursor
    • AboAI API Integration with Codex-cli
    • AboAI API Integration with Codex Desktop
    • AboAI API Integration with Hermes Agent
  1. Embeddings

Create Embedding

POST
/v1/embeddings
๐Ÿ“˜ API Introduction (Embeddings API)
The Embeddings API is used to convert text into high-dimensional vectors (vector representation), which are widely applied in scenarios such as semantic search, similarity calculation, clustering, and recommendation systems.
This endpoint maps text onto a fixed-dimension floating-point array (vector) to serve as a machine-understandable semantic representation.
๐ŸŽฏ Applicable Scenarios
๐Ÿ”Ž Semantic Search
Perform similarity matching between user queries and document vectors (e.g., knowledge base retrieval)
๐Ÿค– RAG (Retrieval-Augmented Generation)
Combine with vector databases to achieve context-enhanced Q&A
๐Ÿ“Š Text Clustering
Automatically classify text based on semantic similarity
๐Ÿง  Recommendation Systems
Execute recommendation ranking based on the semantic similarity of content
๐Ÿ” Authentication Method
All requests must be authenticated via a Bearer Token.
Header Example
Authorization: Bearer sk-xxxxxxxxxx
Content-Type: application/json

Request

Authorization
Header Params

Body Params application/json

Examples

Responses

๐ŸŸข200
application/json
Successful Response
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.aboai.ai/v1/embeddings' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'Content-Type: application/json' \
--data '{
    "input": "Hello World",
    "model": "text-embedding-3-large",
    "encoding_format": "float",
    "dimensions": 1536,
    "user": "user-1234"
}'
Response Response Example
{
    "object": "list",
    "data": [
        {
            "object": "embedding",
            "index": 0,
            "embedding": [
                0.0023063174,
                -0.009361042,
                0.015764702,
                -0.007297516,
                0.004337311,
                -0.00058698654,
                0.0006623268,
                0.02305603,
                -0.005214691,
                -0.01725769,
                -0.005870819,
                0.015945435,
                -0.015335083,
                0.0005760193,
                0.025787354,
                0.014816284,
                -0.023544312,
                -0.015090942,
                0.006893158,
                -0.008895874,
                -0.016586304,
                0.0035057068
            ]
        }
    ],
    "model": "text-embedding-3-large",
    "usage": {
        "prompt_tokens": 16,
        "total_tokens": 16
    }
}
Modified atย 2026-06-16 07:23:03
Previous
Query Video Generation Task Status
Next
Speech Translation
Built with