The OpenAI-compatible Responses API — typed input and output items, reasoning, tools and web search, billed in DA.
POST /v1/responses speaks the Responses shape: typed input items in, typed output items out. Code written for the OpenAI library's responses.create runs unchanged but for the address and the key.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://opendunes.com/v1",
api_key=os.environ["OPENDUNES_API_KEY"],
)
response = client.responses.create(
model="openai/gpt-5.1",
input="What is the capital of Algeria?",
)
print(response.output_text)Each request stands alone: nothing of the conversation is kept between requests. Send the whole conversation in input every time. A request that sets store: true or a previous_response_id is refused with a 400, and nothing is charged.
reasoning parameter and the reasoning items it returns.opendunes:web_search helper and its citations.The same models, the same API key, the same wallet. Any text model answers here, named lab/model as on every route. The answer's usage.cost is the charge in DA, and it carries X-Generation-Id. Every field is on the Responses reference.
A request is billed on the model's own meter, in DA, as on chat completions: input and output tokens, plus each helper call on its own meter. Rates are on each model's page.