Skip to main content

OpenAI Standard API

POST https://chat.agentweave.ai/api/v1/{agent_id}/responses

Request

Path Parameters

agent_id: your agent id

Request Head

Authorization: AgentWeave User Access Token OR Api Key

Example Request

const openai = new OpenAI({
apiKey: agentweaveKey,
baseURL: "https://chat.agentweave.ai/api/v1/{agent_id}",
});

const response = await openai.responses.create({
model: "openai/gpt-5.2",
input: "Hello",
});

// Also support chat completions standard
const response = await openai.chat.completions.create({
model: "openai/gpt-5.2",
messages: [{ role: "user", content: "Hello" }],
});
{
"model": "openai/gpt-5.2", // optional, if not provided the agent's default model will be used
"input": "Hello",
"stream_options": { "include_usage": true }, // optional
"stream": true, // optional, default is false
"previous_response_id": "c11f1429-b0f5-4ab7-8331-b5ba71bcd778" // optional, when provided it will carry over the previous conversation context
}
{
"input": [
{ "role": "user", "content": [
{ "type": "input_text", "text": "Describe the image" },
{ "type": "image_url", "image_url": "https://xxx.jpg" }
] },
],
}

Example Response

{
"type": "response.completed",
"response": {
"id": "9b0d8ce2-62a5-4e03-86fd-00cfb8ccf23d",
"object": "response",
"created_at": 1770283126,
"model": "openai/gpt-5.2",
"status": "completed",
"output": [
{
"id": "msg_1770283126_309xwbw9",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello—what can I help you with today?"
}
]
}
],
"usage": {
"input_tokens": 7,
"output_tokens": 14,
"total_tokens": 21
}
}
}