Let a model propose file edits as V4A diffs, checked before they reach you — on the Responses route.
The opendunes:apply_patch helper is the building block of a coding agent. The model proposes a change to a file as a V4A diff; the diff is checked, and handed to your application, which applies it and reports back. Nothing is written to any file on our side.
It works on /v1/responses only. Named on another route, it answers 400.
curl https://opendunes.com/v1/responses \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.6-luna",
"input": "Rename the function calcTotal to computeTotal in src/cart.js.",
"tools": [{ "type": "opendunes:apply_patch" }]
}'apply_patch_call output item, its operation one of create_file, update_file, delete_file.apply_patch_call_output input item.| Field of the outcome | Holds |
|---|---|
call_id | the call_id of the apply_patch_call |
status | completed or failed |
output | optional — what happened, in words |
| Parameter | Does |
|---|---|
engine | auto (the default) streams the diff as the model writes it where the model's provider does so, and checks it whole otherwise; native asks for the streamed diff |
No charge beyond the model's tokens.