API 目录

Stable-Diffusion

POST
/v1/chat/completions

Stable-Diffusion

POST https://www.vortapapi.com/v1/chat/completions

通过 Chat Completions 接口提交提示词与相关参数后,模型会生成对应的回复内容。响应中可能包含一个或多个候选结果,并返回本次请求的 token 用量等信息。

请求头

名称必填说明
Content-Type请求体格式,通常为 application/json
Accept期望的响应格式,通常为 application/json
AuthorizationAPI 鉴权信息,格式为 Bearer sk-***

响应示例

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "\n\nHello there, how may I assist you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
  }
}