Bamboo Relay
AI model APIImagesNative Gemini format

OpenAI chat format

Gemini image generation

POST
/v1/chat/completions

Authorization

BearerAuth
AuthorizationBearer <token>

Authenticate with a Bearer token: Authorization: Bearer sk-xxxxxx.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response 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  }}