API Doc-CometAPI
HomeDashBoardModel Marketplace
HomeDashBoardModel Marketplace
Discord_Support
  1. Text Models-openai format
  • GET START
    • Quick Start
    • Important Guidelines
    • Release Notes
  • API Reference
    • Error Codes & Handling
    • Text Models-openai format
      • Chat
        POST
      • response
        POST
      • gpt-4o-image generates image
        POST
      • Images
        POST
      • Image Editing (gpt-image-1)
        POST
      • Recognizing Images
        POST
      • Embeddings
        POST
      • Realtime
        POST
      • Models
        GET
      • Hunyuan3D
        POST
    • Anthropic Compatiable
      • Anthropic Claude
    • Image Models
      • Midjourney(images)
        • Quick Tutorial - Complete Process in One Go
        • Task Fetching API
          • List by Condition
          • Fetch Single Task (most recommended)
        • Imagine
        • Submit Video
        • Submit Editor
        • Action (UPSCALE; VARIATION; REROLL; ZOOM, etc.)
        • Blend (image -> image)
        • Describe (image -> text)
        • Modal (Area Redesign & Zoom)
      • Flux(images)
        • Generate image (replicate format)
        • Create Task - General
        • flux fine-tune images(Temporarily unavailable)
        • flux generate image(Temporarily unavailable)
        • flux query
      • Replicate(image)
        • Create Task - General
        • Create Task -flux-kontext-pro、max
        • Create Task -flux-1.1-pro
        • Create Task -flux-1.1-pro-ultra
        • replicate query
      • Recraft(images)
        • Appendix
        • Recraft Generate Image
        • Recraft Vectorize Image
        • Recraft Remove Background
        • Recraft Clarity Upscale
        • Recraft Create style
        • Recraft Generative Upscale
      • Ideogram(images)(Temporarily removed)
        • Official documentation (updated in real time)
        • Generate 3.0 (text to image)
        • Remix 3.0 (hybrid image)
        • Reframe 3.0(Reconstruction)
        • Replace Background 3.0(Background replacement)
        • Edit 3.0(Editing images)
        • ideogram Text Raw Image
        • ideogram Hybrid image
        • ideogram enlargement HD
        • ideogram describes the image
        • ideogram Edit image((legacy))
    • Music Models
      • Suno
        • Setting suno Version
        • Suno API Scenario Application Guide
        • Generate lyrics
        • Generate music clip
        • Upload clip
        • Submit concatenation
        • Full Track Audio Separation
        • Single Track Audio Separation
        • Create New Persona
        • Single task query
        • Generate mp4 mv video
        • Timing: lyrics, audio timeline
        • Get wav format file
        • Batch query tasks
      • Udio(Temporarily unavailable)
        • Generate music
        • Task query
    • Video Models
      • veo3
        • veo3-chat format
        • Submit video generation task
        • Query video generation status
      • runway(video)
        • official format
          • runway images raw video
          • Generate a video from a video
          • Generate an image from text
          • Upscale a video
          • Control a character
          • runway to get task details
        • Reverse Format
          • generate(text)
          • generate(Reference images)
          • Video to Video Style Redraw
          • Act-one Expression Migration
          • feed-get task
      • kling (video)
        • callback_url
        • testing
          • Multimodal Video Editing (In Testing)
            • Initialize Video for Editing
            • Add Video Selection
            • Delete Video Selection
            • Clear Video Selection
            • Preview Selected Video Area
            • Create Task
        • Expanded
        • Generating images
        • Text Generation Video
        • Image Generation Video
        • Multi-Image To Video
        • Multi-Image to Image
        • Video Extension
        • virtual try-on
        • lip sync
        • effects
        • Video to audio
        • Text to audio
        • Individual queries
      • MiniMax Conch(video)
        • MiniMax Conch Official Documentation
        • MiniMax Conch Generation
        • MiniMax Conch Query
        • MiniMax Conch Download
      • luma (video)
        • Official api interface format
          • luma generate
          • luma search
      • bytedance
        • bytedance-video
        • bytedance-video get
        • bytedance-image-generation
        • bytedance-Image Editing
      • PIKA(video)
        • pika feed
        • PIKA Reference Video Generation
        • PIKA Reference Image Generation
        • PIKA reference text generation
      • sora(temporarily dismantle)
        • Reverse Format
          • Create Video
          • Query Video Task
          • Create Video
    • Audio Models
      • Create speech
      • Create transcription
      • Create translation
  • CODE EXAMPLES
    • Code example
  • Guides & Tutorials
    • Integration Guides
      • cometapi Site API Call Testing
      • OpenManus
      • Chatbox
      • CherryStudio
      • Cursor
      • ChatHub
      • COZE
      • FastGPT
      • cline
      • dify
      • gptme
      • Immersive Translation
      • Lobe-Chat
      • Zotero
      • LangChain
      • AnythingLLM
      • Eudic Translation
      • OpenAI Translator
      • ChatAll Translation
      • Pot Translation
      • GPT Academic Optimization (gpt_academic)
      • NEXT CHAT (ChatGPT Next Web)
      • Obsidian's Text Generator Plugin
      • Open WebUI
      • avante.nvim
      • librechat
      • Lazy Customer Service
      • utools-ChatGPT Friend
      • IntelliJ Translation Plugin
      • n8n
    • Best Practices
      • Claude Code Installation and Usage Guide
      • Gemini CLI Installation and Usage Guide
      • CometAPI Account Balance Query API Usage Instructions
      • Retry Logic Documentation for CometAPI and OpenAI Official API
      • Midjourney Best Practices
      • Runway Best Practices
  • Pricing & Billing
    • About Pricing
  • Support
    • Help Center
    • Confusion about use
    • Common Misconceptions
    • Terms of service
    • Privacy policy
    • Interface Stability
  • Schemas
    • Schemas
      • Sample Schemas
        • Pet
        • Category
        • Tag
      • VideoGenerationRequest
      • TextGenerateRequest
      • ImageGenerateRequest
      • VideoGenerateRequest
      • BaseResponse
      • TextToImageRequest
      • Two-person interactive effect
      • VideoGenerationResponse
      • GenerateResponse
      • EditImageRequest
      • Single image effect
      • ErrorResponse
      • BlendImagesRequest
      • UpscaleRequest
      • DescribeImageRequest
      • ImageGenerationResponse
      • ImageDescriptionResponse
      • ErrorResponse
    • chat-output
    • chat-input
  1. Text Models-openai format

Embeddings

POST
https://api.cometapi.com/v1/embeddings
Maintainer:Not configured

Embeddings API#

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 be used.
input (string, required): The input text for which embeddings need to be generated.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.cometapi.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,
   

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Successful Response
application/json
Body

Previous
Recognizing Images
Next
Realtime
Built with