API
Responses
The OpenAI Responses API at /v1/responses, for models whose endpoints list it. Requests are stateless: every turn carries its own input.
On this page
Request
POST/v1/responses
curl https://inference.dagon.so/v1/responses \
-H "Authorization: Bearer $DAGON_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "abliterated-model-large-flash", "input": "Summarise RFC 9110 in three lines.", "max_output_tokens": 512}'import os
from openai import OpenAI
client = OpenAI(base_url="https://inference.dagon.so/v1", api_key=os.environ["DAGON_KEY"])
r = client.responses.create(
model="abliterated-model-large-flash",
input="Summarise RFC 9110 in three lines.",
max_output_tokens=512,
)
print(r.output_text)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://inference.dagon.so/v1", apiKey: process.env.DAGON_KEY });
const r = await client.responses.create({
model: "abliterated-model-large-flash",
input: "Summarise RFC 9110 in three lines.",
max_output_tokens: 512,
});
console.log(r.output_text);Forwarded fields
model, input, instructions, max_output_tokens, stream, stream_options, temperature, top_p, top_logprobs, tools, tool_choice, parallel_tool_calls, max_tool_calls, text, reasoning, include, truncation, prompt_cache_key, store, metadata, user, safety_identifier. Anything else non-null is 400 unsupported_parameter.
- The output cap is
max_output_tokens(default 16,384). - Stored state cannot be priced, so
previous_response_id,conversation,prompt,background,item_referenceitems andfile_idparts are refused. Send the content inline. tool_choicemay benone,auto,requiredor{type: "function" | "custom", name}naming one of the request's tools; hosted tool types andallowed_toolsare refused.- Images:
input_imageparts.
Last updated