Responses
Create a model response with support for multi-turn input, tools, and reasoning.
Request Conventions
| Item | Value |
|---|---|
| Base URL | https://token.wdcloud.ai |
| Authentication header | Authorization: Bearer <API_KEY> |
| JSON content type | Content-Type: application/json |
Endpoint
POST /v1/responses
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
input | string or array | No | Input text or message list |
instructions | string | No | System instructions |
max_output_tokens | integer | No | Maximum output tokens |
stream | boolean | No | Enable streaming |
tools | array | No | Tools available to the model |
tool_choice | string or object | No | Tool selection strategy |
reasoning | object | No | Reasoning settings |
previous_response_id | string | No | Previous response ID |
truncation | string | No | Truncation strategy: auto or disabled |
Example
bash
curl -X POST "https://token.wdcloud.ai/v1/responses" \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"input": "Explain why the sky is blue in one sentence."
}'