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

Responses

View Markdown ↗

Stateless text generation, custom function tools and structured output through the native Go gateway.

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

POST/v1/responses

Stateless request#

Use model, input and max_output_tokens. The gateway always forwards store:false and background:false, including when omitted. Stored response IDs, item references, encrypted reasoning state, images, files and hosted tools are rejected. Send the complete text/tool transcript on each request.

{
  "model":"darkseek-v4.1",
  "input":"Reply with a short greeting.",
  "max_output_tokens":128,
  "store":false,
  "stream":false
}

Tools and structured output#

Client-executed function tools support named/auto/required/none tool choice and JSON-object parameter schemas. Return each pending call_id once with function_call_output before generating again. Text, JSON-object and strict JSON-schema output formats are supported. Remote schema references and backend-private options are rejected. The official SDK’s parsed replay helpers must agree with their original JSON and are stripped before forwarding.

Streaming completion#

SSE uses response.created, indexed item/part deltas and response.completed or response.incomplete; it does not use [DONE]. The gateway checks sequence, identity, text/tool-argument consistency, terminal usage and upstream EOF before forwarding the terminal event. An error or truncated stream is not successful completion. Reasoning is plaintext when available, not an opaque stored state.

Verification and known limit#

A six-generation official OpenAI SDK canary passed through isolated Better Auth/D1 account admission, signed native Go and the physical model runtime: JSON, text SSE, streamed tool use, tool continuation, strict JSON schema and a four-token incomplete result. Shared quota exhaustion and key revocation passed. The installed origin fails a one-token output budget internally; it is not certified. These bounded checks are not load, latency, billing or public-availability proof. Public production inference remains disabled until native Go hosting and private ingress are configured.