FIM
Create a fill-in-the-middle completion
Changed onGenerate a code completion given a prompt (prefix) and optional suffix. Designed for IDE-style inline completion. Returns a FimCompletion object, or a server-sent events stream of FimCompletionChunk deltas when stream=true. Tool calling and function calling are not supported.
post/v1/fim/completions
Request
- Base URLhttps://api.inceptionlabs.ai
- URLhttps://api.inceptionlabs.ai/v1/fim/completions
- AuthHTTP bearer
Request body
Response
Successful response. Returns a JSON object when stream=false, or a server-sent events stream of TextCompletionChunk objects (terminated by data: [DONE]) when stream=true.
Example response
{
"id": "cmpl-7a2b3c4d5e",
"object": "text_completion",
"created": 1745798400,
"model": "mercury-edit-2",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"text": "fibonacci(n - 1) + fibonacci(n - 2)"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 14,
"total_tokens": 38,
"reasoning_tokens": 0,
"cached_input_tokens": 0
}
}Changes
- breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status
- breaking