Create a model response
Changed onOpenAI-compatible Responses API. Each request runs as a chat completion, and is charged, limited and recorded as one. Each request must send the whole conversation in input: store: true, a previous_response_id, a conversation or an item_reference input item gets a 400 that says so. A request without max_output_tokens is bounded at 32,768 output tokens, or the model's lower limit. Function and namespace tools are served, and web_search tools are ignored. Each image the model does not accept becomes a text note in its place: every image on a model without image input, and on any other model the oldest images beyond the model's max_images_per_request. text.format becomes chat's response_format. Beside tools under tool_choice auto, the route instead offers a json_schema format's schema to the model as one more function, final_answer, and sets tool_choice to required, so the model can call tools before it answers; the route returns a call to final_answer as the answer message, with phase final_answer, and leaves out any text the model writes, because openai-python's responses.parse parses every message as the answer. The route accepts text.verbosity and service_tier and ignores them. Errors are those of POST /chat/completions, and the 400 for a value that chat rejects names the chat field, such as max_tokens or messages[3].content. With stream: true the response is text/event-stream in the Responses event format, ending with response.completed or response.incomplete, or with response.failed for a failure after streaming has begun.
Request
- Base URLhttps://api.hedra.com/v3
- Auth
- API key in header Authorization
- or HTTP bearer
Response
Successful Response
Changes
- info
endpoint added
- info