Skip to content
Dashboard

OpenResponses API now supported on Vercel AI Gateway

const response = await fetch('https://ai-gateway.vercel.sh/v1/responses', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.VERCEL_AI_GATEWAY_KEY}`,
},
body: JSON.stringify({
model: 'anthropic/claude-sonnet-4.5',
input: [
{
type: 'message',
role: 'user',
content: 'Explain quantum computing in one sentence.',
}
],
}),
});

const response = await fetch('https://ai-gateway.vercel.sh/v1/responses', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.VERCEL_AI_GATEWAY_KEY}`,
},
body: JSON.stringify({
model: 'zai/glm-4.7',
input: [{ type: 'message', role: 'user', content: 'What is the weather in SF?' }],
tools: [{
type: 'function',
name: 'get_weather',
description: 'Get current weather for a location',
parameters: {
type: 'object',
properties: { location: { type: 'string' } },
required: ['location'],
},
}],
}),
});

Ready to deploy?