APIQIKAPIQIK
Docs
Features

FIM Completion

Generate missing code between a prefix and suffix for inline editor completion and code repair.

Fill-in-the-Middle (FIM) generates missing content between a code prefix and suffix. It suits IDE inline completion, function-body generation, and localized code repair.

This is an interface template. FIM has no universal Chat Completions fields. Models may use dedicated endpoints, special tokens, or prompt/suffix parameters. Follow the actual APIQIK implementation.

Request template

POST <FIM_COMPLETION_ENDPOINT>

{
  "model": "<fim-capable-model-id>",
  "prompt": "def normalize_name(value: str) -> str:\n    ",
  "suffix": "\n\nprint(normalize_name('  APIQIK  '))",
  "max_tokens": 128,
  "temperature": 0.1
}

Editor integration

  • Capture bounded context before and after the cursor, prioritizing the current function, types, and imports.
  • Wait tens to hundreds of milliseconds after typing stops rather than requesting on every keystroke.
  • Cancel the previous request when a new one starts; show only results matching the current document version.
  • Keep output short and hide stale suggestions as soon as typing resumes.
  • Do not upload secrets, configuration files, customer data, or unrelated code.

Evaluation metrics

MetricMeaning
Acceptance rateProportion of suggestions accepted in full or in part.
Time to first tokenTime from triggering a request to displaying the first suggestion segment.
Compile success rateProportion of completed code passing syntax or compilation checks.
Edit distanceAmount of user editing after accepting a suggestion.
Cost per useful acceptanceTotal model cost divided by useful accepted suggestions.