Mistral AI
    Mistral AI
    • Create Chat Completions
      POST
    • Create FIM Completions
      POST
    • Create Embeddings
      POST
    • List Available Models
      GET
    • Delete Model
      DELETE
    • Upload File
      POST
    • List Files
      GET
    • Retrieve File
      GET
    • Delete File
      DELETE
    • List Fine Tuning Jobs
      GET
    • Create Fine Tuning Job
      POST
    • Get Fine Tuning Job
      GET
    • Cancel Fine Tuning Job
      POST
    • Schemas
      • Schemas
        • Error
        • ErrorResponse
        • ModelList
        • Regular
        • JSON mode
        • Function calling
        • FIMCompletionRequest
        • Regular
        • JSON mode
        • Function calling
        • EmbeddingRequest
        • EmbeddingResponse
        • Model
        • UploadFileOut
        • ListFilesOut
        • RetrieveFileOut
        • DeleteFileOut
        • DeleteModelOut
        • FineTuneableModel
        • JobOut
        • JobsOut
        • TrainingParameters
        • WandbIntegrationOut
        • JobIn
        • WandbIntegration
        • CheckpointOut
        • DetailedJobOut
        • EventOut
        • MetricOut
        • UploadFileResponse
        • FileSchema
        • ListFilesResponse
        • RetrieveFileResponse
        • DeleteFileResponse
        • FIMCompletionResponse
        • JobMetadata
        • HTTPValidationError
        • ValidationError

      Create Embeddings

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      POST
      /embeddings

      Request

      Body Params application/json

      Examples

      Responses

      🟢200OK
      application/json
      Body

      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://dev.your-api-server.com/embeddings' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "model": "mistral-embed",
          "input": [
              "Hello",
              "world"
          ],
          "encoding_format": "float"
      }'
      Response Response Example
      {
          "id": "embd-aad6fc62b17349b192ef09225058bc45",
          "object": "list",
          "data": [
              {
                  "object": "embedding",
                  "embedding": [
                      0.1,
                      0.2,
                      0.3
                  ],
                  "index": 0
              },
              {
                  "object": "embedding",
                  "embedding": [
                      0.4,
                      0.5,
                      0.6
                  ],
                  "index": 1
              }
          ],
          "model": "string",
          "usage": {
              "prompt_tokens": 9,
              "total_tokens": 9
          }
      }
      Modified at 2024-07-29 08:30:19
      Previous
      Create FIM Completions
      Next
      List Available Models
      Built with