Documentation renewed! For old docs, visit doc.newapi.pro
New APINew API
User GuideInstallationAPI ReferenceAI ApplicationsHelp & SupportBusiness Cooperation
AI Model APIImagesGemini

OpenAI Chat Format

Gemini Image Generation

POST
/v1/chat/completions

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model*string
stream*boolean
messages*
extra_body?
contents*

Response Body

application/json

curl -X POST "https://loading/v1/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "stream": true,    "messages": [      {}    ],    "contents": [      {}    ]  }'
{
  "id": "string",
  "model": "string",
  "object": "string",
  "created": 0,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "string",
        "content": "string"
      },
      "finish_reason": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0
  }
}

How is this guide?

Last updated on