{"openapi":"3.1.0","info":{"title":"DarkSeek API","version":"0.1.0","description":"DarkSeek developer-preview contract. A schema is not a deployment-readiness claim. Custom domains and public account/credit integration are launch gates. Independently operated by SenkuLabs."},"servers":[{"url":"/v1","description":"Same-origin API on a connected DarkSeek deployment"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Models"},{"name":"Generation"}],"paths":{"/models":{"get":{"operationId":"listModels","tags":["Models"],"summary":"List available DarkSeek models","responses":{"200":{"description":"Configured model catalogue","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Admission limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or unconfigured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chat/completions":{"post":{"operationId":"createChatCompletion","tags":["Generation"],"summary":"Generate a text chat completion","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Chat completion or SSE stream; read [DONE] before claiming completion","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object"}},"usage":{"$ref":"#/components/schemas/Usage"}}}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Browser origin rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Use application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Admission limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"502":{"description":"Upstream transport/protocol failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Unavailable or unconfigured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inference deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses":{"post":{"operationId":"createResponse","tags":["Generation"],"summary":"Create a stateless Responses-format generation","description":"Existing backend tiny non-streaming probe passed. Public account quotas and streaming reconciliation need exact launch verification. No hosted tools, retrieval or background jobs promised.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"const":"darkseek-v4.1"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"max_output_tokens":{"type":"integer","minimum":1,"description":"Deployment-specific ceiling; query Models and account limits. Default output policy is 4096 tokens."},"stream":{"type":"boolean","default":false},"background":{"const":false}}}}}},"responses":{"200":{"description":"Responses-format backend result or event stream","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Browser origin rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Use application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Admission limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"502":{"description":"Upstream transport/protocol failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Unavailable or unconfigured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inference deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"An issued DarkSeek API key, not a DeepSeek credential. Account-owned self-service keys are a launch gate."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}},"Model":{"type":"object","required":["id","object","owned_by"],"properties":{"id":{"const":"darkseek-v4.1"},"object":{"const":"model"},"owned_by":{"const":"darkseek"},"name":{"type":"string"},"max_output_tokens":{"type":"integer"},"output_modalities":{"type":"array","items":{"const":"text"}}}},"ChatRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"const":"darkseek-v4.1"},"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant","tool","developer"]},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","minimum":1,"description":"Deployment-specific ceiling; query Models and account limits. Default output policy is 4096 tokens."},"stream":{"type":"boolean","default":false},"temperature":{"type":"number","minimum":0,"maximum":2},"n":{"const":1}}},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0},"completion_tokens":{"type":"integer","minimum":0},"total_tokens":{"type":"integer","minimum":0}}}}}}