curl https://ai-gateway.helicone.ai/v1/responses \
-H "Authorization: Bearer $HELICONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"input": "Say hello in one sentence."
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai-gateway.helicone.ai/v1",
apiKey: process.env.HELICONE_API_KEY,
});
const response = await client.responses.create({
model: "gpt-4o-mini",
input: "Say hello in one sentence.",
});
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai-gateway.helicone.ai/v1",
api_key=os.environ.get("HELICONE_API_KEY"),
)
response = client.responses.create(
model="gpt-4o-mini",
input="Say hello in one sentence.",
)
AI Gateway
Responses (Gateway)
Create responses via the AI Gateway
POST
/
v1
/
responses
curl https://ai-gateway.helicone.ai/v1/responses \
-H "Authorization: Bearer $HELICONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"input": "Say hello in one sentence."
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai-gateway.helicone.ai/v1",
apiKey: process.env.HELICONE_API_KEY,
});
const response = await client.responses.create({
model: "gpt-4o-mini",
input: "Say hello in one sentence.",
});
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai-gateway.helicone.ai/v1",
api_key=os.environ.get("HELICONE_API_KEY"),
)
response = client.responses.create(
model="gpt-4o-mini",
input="Say hello in one sentence.",
)
This request schema applies when using the Helicone AI Gateway with pass‑through billing (credits). In BYOK mode, the standard OpenAI Responses API schema is allowed. The schema is defined based on fields that are stable across all provider-model mappings.
Learn more about pass‑through billing vs BYOK.
curl https://ai-gateway.helicone.ai/v1/responses \
-H "Authorization: Bearer $HELICONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"input": "Say hello in one sentence."
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai-gateway.helicone.ai/v1",
apiKey: process.env.HELICONE_API_KEY,
});
const response = await client.responses.create({
model: "gpt-4o-mini",
input: "Say hello in one sentence.",
});
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai-gateway.helicone.ai/v1",
api_key=os.environ.get("HELICONE_API_KEY"),
)
response = client.responses.create(
model="gpt-4o-mini",
input="Say hello in one sentence.",
)
Body
application/json
Required range:
0 <= x <= 20Available options:
auto, default, flex, scale, priority Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
tool_choice
Option 1 · enum<string>Option 2 · objectOption 3 · objectOption 4 · objectOption 5 · objectOption 6 · object
Available options:
none, auto, required Available options:
auto, disabled Available options:
message.input_image.image_url, code_interpreter_call.outputs, reasoning.encrypted_content, message.output_text.logprobs Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200
Request accepted
Was this page helpful?