API Doc-ElkAPI
  1. OpenAI Format
API Doc-ElkAPI
  • Quick Start
    • Quick Start
    • Must-read for beginners
    • ElkAPI Announcement
  • API Reference
    • Error status code description
    • OpenAI Format
      • Veo3-chat format
        POST
      • seedance
        POST
      • response
        POST
      • generate video
        POST
      • image
        POST
      • Image Editing (gpt-image-1)
        POST
      • embed
        POST
      • Realtime
        POST
      • Get model list
        GET
      • Response ID to obtain results
        GET
      • Hunyuan3D
        POST
    • Anthropic Format
      • Anthropic Claude
    • Midjourney Image Generation
      • Quick teaching-complete process in one go
      • Task Query
        • pagination query
        • Specify ID to obtain task
      • Submit Imagine task
      • Submit video task
      • Submit editing task
      • Submit Action Task
      • Submit Blend task
      • Submit Describe task
      • Submit Modal
    • Image Generation
      • ideogram(images)
        • Official documentation (updated in real time)
        • Generate 3.0 (illustrated in the text)
        • Reframe 3.0 (Refactoring)
        • Replace Background 3.0
        • Remix 3.0 (Mixed Graph)
        • Edit 3.0 (Edit)
        • Generate (text and image)
        • Remix (mixed image)
        • Upscale (enlarged high-definition)
        • Describe
        • Edit
      • Flux(images)
        • Create Task - General
        • generate image
        • Fine tuning (temporarily unavailable)
        • query task
        • Generate image (replica format)
      • Replicate(image)
        • Create Task - General
        • Create task - float kontext pro, max
        • Create task-black forest labs/flux-1.1-pro
        • Create task-black forest labs/flux-1.1-pro ultra
        • query task
        • Create task
      • Recraft(images)
        • Generate Image
        • Vectorize Image
        • Remove Background
        • Clarity Upscale
        • Create style
        • Generative Upscale
    • Music Generation
      • Suno
        • Set suno version
        • Suno API Scenario Application Guide
        • Generate lyrics
        • Generate music
        • Upload music
        • Song Splicing
        • Full track acoustic separation
        • Single track acoustic separation
        • Create a new Persona
        • Query a single task
        • Generate MP4 MV video
        • Retrieve WAV format files
        • Timing: Lyrics, audio timeline
        • Batch query task
        • Create music using persona_id
      • Udio (not available yet)
        • Generate music
        • Query a single task
    • Video Generation
      • veo3
        • veo3-chat format
        • Submit video generation task
        • Check the video generation status
      • Dream Test
        • seedance
      • runway(video)
        • Official format
          • Generate videos from images
          • Get detailed task information
        • Reverse format
          • Generate (text)
          • Generate (refer to image)
          • Video2video video to video style redrawing
          • Act one emoji transfer
          • Feed - Get Task
      • kling (video)
        • Callback Protocol
        • image expansion
        • generate image
        • text-to-video
        • image-to-video
        • Video extension
        • Virtual try on
        • lip-sync
        • video effects
        • Query task (single)
      • luma (video)
        • Official API format
          • generate video
          • Single query task
      • MiniMax Conch (video)
        • Official Documentation
        • video generation
        • query task
        • File Download
      • PIKA(video)
        • Universal version
          • generate video
          • Query video tasks
        • Generate (reference video/extended video)
        • Generate (refer to image)
        • Generate (text)
        • feed
      • sora
        • Reverse format
          • Create video
          • Generate Video
          • Query video tasks
    • Audio
      • Text to audio conversion
      • audio to text
      • Create translation
  • Integration Guide
    • Best Practices
      • Claude code access instructions
      • ElkAPI Account Balance Query API Usage Instructions
      • Retry logic documentation using ElkAPI and OpenAI's official API
      • Midjorney Calling Best Practices
      • Runway Call Best Practices
    • Application Integration Guide
  • Pricing and Billing
    • About Price
    • About Grouping
  • Help Center
    • Help Center
    • Interface stability
    • Common Misconceptions
    • Use confusion
    • Privacy Policy
    • Terms of Service
  1. OpenAI Format

embed

POST
https://api.elkapi.com/v1/embeddings
This API endpoint allows you to generate embeddings for text using a specific model.

Request Body#

model (string, required): The name of the text embedding model to use.
input (string, required): The input text for which embeddings need to be generated.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Successful Response
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.elkapi.com/v1/embeddings' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "text-embedding-3-large",
    "input": "The food was delicious and the waiter..."
}'
Response Response Example
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        -0.010992265,
        0.0027546093,
        -0.0057185953,
        -0.008060995,
        0.0006436691,
        0.010560427,
        -0.011234357,
        -0.056165244,
        -0.010501539,
        0.03946747,
        -0.0047600437,
        0.009192936,
        -0.061766066,
        0.07291536,
        -0.0010280713,
        -0.0033140373,
        -0.01228124,
        -0.012333584,
        -0.03643151,
        0.003035959,
        -0.02189293,
        -0.015153623,
        0.058363695,
        -0.016239764,
        0.06134731,
        -0.024497049,
        -0.012516788,
        0.024353104,
        0.037426047,
        0.015323741,
        -0.015572377,
        0.016737033,
        0.038917854,
        -0.004387092,
        -0.024575565,
        0.02037495,
        0.019301895,
        -0.011404475,
        0.06537781,
        0.032453354,
        -0.052291777,
        0.003467798,
        0.014682527,
        -0.01981225,
        -0.032715075,
        -0.057840254,
        0.0075898976,
        0.0053979876,
        -0.041979987,
        -0.009127506,
        0.0129748,
        -0.015075107,
        0.031720538,
        0.013962795,
        -0.009984641,
        0.01961596,
        -0.029495914,
        -0.014499322,
        -0.013321579,
        -0.032872107,
        -0.01000427,
        -0.03972919,
        0.004910533,
        -0.008532092,
        0.023083758,
        0.022036875,
        0.009487372,
        0.05689806,
        -0.011208185,
        0.006356539,
        0.032034602,
        -0.015729409,
        -0.026564643,
        0.004616097,
        0.038472928,
        0.009605146,
        0.027218943,
        -0.027742384,
        0.0059443293,
        0.0050086784,
        0.034835014,
        -0.0026319278,
        -0.029050987,
        -0.0055255764,
        0.0133739235,
        -0.0037884058,
        -0.038263552,
        -0.092596754,
        -0.03480884,
        0.038813166,
        0.015114365,
        -0.004007597,
        -0.011450277,
        -0.010036985,
        0.02729746,
        0.015088193,
        0.0073478064,
        -0.011705454,
        -0.025687877,
        -0.0023898364,
        -0.033866648,
        -0.0561129,
        -0.011738169,
        -0.035777207,
        0.018608335,
        0.0090947915,
        -0.011875573,
        -0.0342854,
        -0.014525494,
        -0.082389645,
        0.0066869617,
        -0.0014018411,
        -0.04480657,
        0.014878817,
        0.0050708367,
        0.0034318115,
        -0.0045277667,
        -0.042503428,
        -0.018870056,
        -0.020361863,
        -0.023005242,
        -0.040933102,
        0.0016979125,
        -0.018595248,
        0.056165244,
        -0.012699992,
        -0.016828636,
        -0.029260363,
        -0.004213702,
        -0.01879154,
        -0.0026384708,
        0.012523332,
        -0.03643151,
        0.011162384,
        0.017338991,
        0.008905044,
        -0.011947546,
        0.001720813,
        0.03507056,
        0.010638943,
        0.011391389,
        -0.004596468,
        0.0074917525,
        0.0047306,
        0.004351105,
        0.02512518,
        -0.012549504,
        -0.035646345,
        0.0027022653,
        0.0013846656,
        -0.037138153,
        -0.02673476,
        -0.05268436,
        0.0066673327,
        0.015088193,
        0.0177054,
        -0.001195736,
        0.033997506,
        -0.044283126,
        0.029024815,
        -0.055170704,
        -0.026878707,
        -0.020989994,
        -0.007727301,
        0.01885697,
        0.012699992,
        -0.010867949,
        -0.024994317,
        -0.01542843,
        0.0254785,
        0.003647731,
        0.023136102,
        -0.010593141,
        -0.023293134,
        -0.046847988,
        0.016959496,
        0.026263664,
        0.043000698,
        0.027977934,
        -0.0007328177,
        -0.0017764287,
        0.037373703,
        0.011620395,
        0.014067483,
        -0.038786996,
        -0.014080569,
        0.008819984,
        -0.014224515,
        0.021670466,
        0.022102306,
        -0.030883033,
        -0.031406473,
        -0.017365163,
        -0.043576483,
        -0.0354108,
        0.040174115,
        0.010985723,
        0.012870111,
        -0.0278209,
        0.029548258,
        0.030281074,
        0.0016979125,
        0.010324878,
        -0.0019530901,
        -0.0008252378,
        0.02469334,
        0.0019203749,
        -0.0040566693,
        0.009016275,
        -0.00585927,
        0.03352641,
        -0.015663978,
        -0.02235094,
        0.0047862157,
        -0.030307246,
        0.010540797,
        -0.009932297,
   
Previous
Image Editing (gpt-image-1)
Next
Realtime
Built with