Skip to content
DarkSeek API developer preview. View supported features and launch status

Text completions

View Markdown ↗

Bounded text continuation; genuine fill-in-the-middle remains unavailable.

此链接保留对应的中文文档路径。目前技术参考内容为英文;功能可用性以 DarkSeek 的实际部署和验证状态为准。

POST/v1/completions

One text prompt#

Supply a nonempty text prompt, model and max_tokens. Only one result is admitted (n=1, best_of=1); echo and logprobs are not supported. Sampling and up to four nonempty stop strings are bounded. Token-array or batch prompts and backend-private options are rejected.

{
  "model":"darkseek-v4.1",
  "prompt":"2 + 2 =",
  "max_tokens":8,
  "temperature":0,
  "stop":["\n"]
}

Streaming and limits#

The gateway requests final usage for every stream, even if include_usage=false was supplied. Success requires a coherent indexed text_completion lifecycle, stop/length finish reason, final usage and [DONE] followed by clean upstream EOF. Truncation, changed identity, excess reported output, duplicate terminal events or trailing errors are not successful completion. A length finish reason means the output limit was reached, not that the answer is complete. Private weight-version metadata is removed.

FIM is not certified#

The deployment reports fim_supported:false and rejects every suffix field, including an empty suffix, before consuming an edge inference allowance. The installed tokenizer recognizes FIM markers, but bounded physical prefix/suffix probes did not establish correct middle insertion. Silently ignoring suffix or treating ordinary continuation as FIM would be misleading. A genuine tested FIM model path is still required.

Availability boundary#

Text completion is a developer-preview contract under the same account, key, admission and cancellation rules as the other generation routes. Public production inference remains disabled pending native Go hosting and authenticated private ingress. Local protocol tests do not establish public availability, billing or representative load.