Guide: Responses
The GIP gateway also supports the OpenAI responses API for compatible models. It is fully compatible with OpenAI clients and libraries.
Supported Models
For a complete list of available models, please refer to the Models section and filter by the capability responses
.
Create response - text input
Using Python
client = OpenAI(
api_key="sk-...",
base_url="https://api.platform.a15t.com/v1",
)
response = client.responses.create(
model="openai/gpt-4o-2024-11-20",
input="Write me a haiku about tomatoes.",
)
print(response.output[0].content[0].text)
Using cURL
curl -s https://api.platform.a15t.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "openai/gpt-4o-2024-11-20",
"input": "Write me a haiku about tomatoes."
}'
Create response - web search
Using Python
client = OpenAI(
api_key="sk-...",
base_url="https://api.platform.a15t.com/v1",
)
response = client.responses.create(
model="openai/gpt-4o-2024-11-20",
tools=[{"type": "web_search_preview"}],
input="What is the weather forecast for Seoul tomorrow?",
)
print(response.output[1].content[0].text)
Using cURL
curl -s https://api.platform.a15t.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "openai/gpt-4o-2024-11-20",
"tools": [{"type": "web_search_preview"}],
"input": "What is the weather forecast for Seoul tomorrow?"
}'