Responses API
Endpoint
POST /v3/responsesKompatibel dengan OpenAI Responses API — dipakai oleh tools seperti Codex CLI.
Request
{ "model": "bt/gpt-4o", "instructions": "Kamu asisten yang membantu.", "input": "Halo!", "max_output_tokens": 2048}input bisa berupa string tunggal atau array pesan/blok konten. instructions diperlakukan sebagai system prompt.
Response
{ "id": "resp_xxx", "object": "response", "status": "completed", "model": "bt/gpt-4o", "output": [ { "type": "message", "role": "assistant", "content": [{"type": "output_text", "text": "Halo! Ada yang bisa saya bantu?"}] } ], "output_text": "Halo! Ada yang bisa saya bantu?", "usage": {"input_tokens": 12, "output_tokens": 8, "total_tokens": 20}}Kalau model memanggil tool, output juga berisi item type: "function_call" dengan call_id, name, dan arguments.
Parameter
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | required | Model ID (prefix bt/) |
input | string | array | required | Input pesan |
instructions | string | - | System prompt |
max_output_tokens | integer | 8192 | Maks token output |
stream | boolean | false | Enable streaming |
tools | array | - | Definisi tool (format OpenAI Responses) |
tool_choice | string | object | - | Kontrol pemanggilan tool |