API/responses
A REST API for conversations, reasoning, tool calls and streaming. Codex and Grok CLI can use this endpoint too.
https://api.framewharf.com/v1/responsesAuthorization: Bearer sk-your_api_keyinput accepts a string or an array of items. Take the model's id from GET /v1/models.
curl "https://api.framewharf.com/v1/responses" \
-H "Authorization: Bearer sk-your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen4-max",
"input": "Summarize the benefits of a unified API."
}'With stream: true, the response is a stream of named events, such as response.output_text.delta and response.completed.
curl --no-buffer "https://api.framewharf.com/v1/responses" \
-H "Authorization: Bearer sk-your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen4-max",
"input": "Suggest five product names for an AI app.",
"stream": true
}'Use instructions for the system prompt, or send an input array holding several turns of the conversation.
{
"model": "qwen4-max",
"instructions": "You are a documentation assistant. Keep answers short.",
"input": [
{ "role": "user", "content": "Explain a REST API in one sentence." },
{ "role": "assistant", "content": "A REST API is an HTTP interface built from resources and standard methods." },
{ "role": "user", "content": "Give me an example." }
]
}