Create a response
OpenAI-compatible Responses endpoint used by Codex and agents.
OpenAI-compatible Responses API for GPT models. This is the protocol Codex uses, and the best choice for agentic GPT workloads.
POST
https://api.evolved.to/v1/responsesRequest
Authenticate with Authorization: Bearer <your key> and send a JSON body.
Body parameters
modelstringrequired- A GPT model ID, e.g.
gpt-5. See Models. inputstring | arrayrequired- Text, or an array of input items (messages, images, files, tool outputs).
instructionsstring- System-level instructions for the model.
max_output_tokensinteger- Upper bound on generated tokens, including reasoning tokens.
reasoningobject- Reasoning settings such as
effort, for models that support them. toolsarray- Function tools the model may call.
streamboolean- Stream typed events as server-sent events.
Response
idstring
Unique ID of the response.
statusstring
completed, incomplete or failed.outputarray
Output items:
message items with output_text content, plus reasoning and function_call items. The SDKs expose the concatenated text as output_text.usageobject
input_tokens, output_tokens, total_tokens, and input_tokens_details.cached_tokens.curl https://api.evolved.to/v1/responses \
-H "Authorization: Bearer $EVOLVED_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "gpt-5",
"input": "Hello!"
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.evolved.to/v1",
api_key=os.environ["EVOLVED_API_KEY"],
)
response = client.responses.create(
model="gpt-5",
input="Hello!",
)
print(response.output_text)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.evolved.to/v1",
apiKey: process.env.EVOLVED_API_KEY,
});
const response = await client.responses.create({
model: "gpt-5",
input: "Hello!",
});
console.log(response.output_text);{
"id": "resp_67ccd2bed1ec8190b14f964abc054267",
"object": "response",
"status": "completed",
"model": "gpt-5",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{ "type": "output_text", "text": "Hi! How can I help?" }
]
}
],
"usage": {
"input_tokens": 9,
"input_tokens_details": { "cached_tokens": 0 },
"output_tokens": 8,
"total_tokens": 17
}
}