demand.ai API
    demand.ai API
    • Generate a completion
      POST
    • Generate a chat completion
      POST
    • Generate Embeddings
      POST
    • Schemas
      • Schemas
        • postGenerate
        • postChat
        • generateResponse
        • chatResponse
        • chatResponseFinal
        • Success
        • postEmbed
        • Error
        • embedResponse
      • Response
        • Unauthorized
        • BadRequest

      Generate Embeddings

      POST
      /embed
      Generate embeddings from a model

      Request

      Body Params application/json

      Examples

      Responses

      🟢200OK
      application/json
      Body

      🟠400Bad Request
      🟠401Unauthorized
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.demandai.de/v1/embed' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "model": "mxbai-embed-large:335m",
          "input": "Why is the sky blue?"
      }'
      Response Response Example
      200 - Example 1
      {
          "model": "mxbai-embed-large:335m",
          "embeddings": [
              [
                  0.010071029,
                  -0.0017594862,
                  0.05007221,
                  0.04692972,
                  0.054916814,
                  0.008599704,
                  0.105441414,
                  -0.025878139,
                  0.12958129,
                  0.031952348
              ]
          ],
          "total_duration": 5043500667,
          "load_duration": 5025959,
          "prompt_eval_count": 26
      }
      Modified at 2025-11-04 14:46:01
      Previous
      Generate a chat completion
      Next
      postGenerate
      Built with