Create a model response in the Responses shape — typed input and output items, tools and reasoning.
POST https://opendunes.com/v1/responsesBilled, with an API key: Authorization: Bearer $OPENDUNES_API_KEY. The request and the answer are the Responses shape, so code written for the OpenAI library's responses.create runs unchanged but for the address and the key. The guide is Responses API.
curl https://opendunes.com/v1/responses \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"instructions": "You answer Souk customers in French.",
"input": "Quels sont vos horaires le vendredi ?",
"reasoning": { "effort": "low" }
}'Every field travels to the model as you sent it. The answer is the model's, with its usage.cost in DA; it carries X-Generation-Id.
| the model | any text model, a preset (@preset/<slug>) or a router (opendunes/auto); the name's suffixes as on Models |
| helpers | opendunes:web_search, opendunes:web_fetch, opendunes:shell, opendunes:apply_patch, opendunes:tool_search and the others in tools, beside your own functions. opendunes:apply_patch works here and not on Messages; opendunes:bash works on Messages and not here |
| streaming | "stream": true streams the Responses events; the usage rides the closing event — see Streaming |
| the response cache | X-OpenDunes-Cache: true — see Response caching |
provider.max_price | in DA |
Files the shell helper leaves are read at Containers.
An error is answered at its status as a failed response, in the Responses shape — id, status: "failed", error.code, error.message and error_type. A model that is not on sale is a 404 with error_type not_found, and nothing is charged.