Bamboo Relay
AI 模型接口图像(Images)原生Gemini格式

OpenAI聊天格式

Gemini 图片生成

POST
/v1/chat/completions

认证

BearerAuth
AuthorizationBearer <token>

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

In: header

请求体

application/json

TypeScript 类型定义

在 TypeScript 中使用 request body 类型。

响应体

application/json

curl -X POST "https://example.com/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  }}