1. Embeddings
  • Start
    • Product Intrduction
    • Quick to use
    • Using Nexhina in AI Coding Tools
  • API integration explanation
    • Quick Start
    • Getting an API Key
    • Authentication
    • Request URL
    • HTTP Status Codes
    • Streaming Output Guide
  • API Endpoints
    • Chat
      • Chat Completion
    • Models
      • List Available Models
    • Responses
      • Responses API
    • Embeddings
      • Text Embedding
        POST
    • Images
      • Text-to-Image
      • Image-to-Image
    • Audio
      • Text-to-Speech (TTS)
      • Speech-to-Text (STT)
      • Audio Translation
    • Video
      • Generate Video
    • Moderation
      • Content Moderation
    • Rerank
      • Rerank
  • Platform-related
    • Platform agreement
    • Privacy Policy
    • General Questions
  1. Embeddings

Text Embedding

POST
/v1/embeddings
Converts text into vector representations, supports batch input

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Example
{
    "model": "text-embedding-v3",
    "input": "Artificial Intelligence"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/embeddings' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "text-embedding-v3",
    "input": "Artificial Intelligence"
}'

Responses

🟢200
application/json
Successfully returns embeddings
Bodyapplication/json

Example
{
    "object": "list",
    "data": [
        {
            "object": "embedding",
            "index": 0,
            "embedding": [
                0.0023,
                -0.0094,
                0.0151
            ]
        }
    ],
    "model": "text-embedding-v3",
    "usage": {
        "prompt_tokens": 4,
        "total_tokens": 4
    }
}
🟠401
Modified at 2026-08-18 09:38:12
Previous
Responses API
Next
Text-to-Image
Built with