fim
Fim Completion
Changed onFIM completion.
post/fim/completions
Request
- Base URLhttps://api.mistral.ai/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"model": "[\"codestral-2405\"]",
"suffix": "[\"return a+b\"]",
"prompt": "[\"def\"]"
}Response
Successful Response
Example response
{
"usage": {
"completion_tokens": 34,
"prompt_tokens": 16,
"total_tokens": 50
},
"model": "codestral-latest",
"id": "cmpl-e5cc70bb28c444948073e77776eb30ef",
"object": "chat.completion",
"created": 1702256327,
"choices": [
{
"finish_reason": "stop"
}
]
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking