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

      Create FIM Completions

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      POST
      /fim/completions
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://dev.your-api-server.com/fim/completions' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "prompt": "def",
          "suffix": "return a+b",
          "model": "codestral-latest",
          "temperature": 0.7,
          "top_p": 1,
          "max_tokens": 1024,
          "min_tokens": 0,
          "stream": false,
          "random_seed": 1337,
          "stop": "string"
      }'
      Response Response Example
      {
          "id": "5b35cc2e69bf4ba9a11373ee1f1937f8",
          "object": "chat.completion",
          "created": 1702256327,
          "model": "codestral-latest",
          "choices": [
              {
                  "index": 0,
                  "message": {
                      "role": "user",
                      "content": "\" add(a,b):\""
                  },
                  "finish_reason": "stop"
              }
          ],
          "usage": {
              "prompt_tokens": 8,
              "completion_tokens": 9,
              "total_tokens": 17
          }
      }

      Request

      Body Params application/json

      Examples

      Responses

      🟢200OK
      application/json
      Body

      Modified at 2024-07-29 08:30:19
      Previous
      Create Chat Completions
      Next
      Create Embeddings
      Built with