For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://modelgates.ai/docs/_mcp/server.
Responses API Beta
This API is in beta stage and may have breaking changes. Use with caution in production environments.
This API is stateless - each request is independent and no conversation state is persisted between requests. You must include the full conversation history in each request.
ModelGates's Responses API Beta provides OpenAI-compatible access to multiple AI models through a unified interface, designed to be a drop-in replacement for OpenAI's Responses API. This stateless API offers enhanced capabilities including reasoning, tool calling, and web search integration, with each request being independent and no server-side state persisted.
Base URL
https://modelgates.ai/api/v1/responsesAuthentication
All requests require authentication using your ModelGates API key:
const response = await fetch('https://modelgates.ai/api/v1/responses', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_MODELGATES_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ model: 'openai/o4-mini', input: 'Hello, world!', }),});import requests response = requests.post( 'https://modelgates.ai/api/v1/responses', headers={ 'Authorization': 'Bearer YOUR_MODELGATES_API_KEY', 'Content-Type': 'application/json', }, json={ 'model': 'openai/o4-mini', 'input': 'Hello, world!', })curl -X POST https://modelgates.ai/api/v1/responses \ -H "Authorization: Bearer YOUR_MODELGATES_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/o4-mini", "input": "Hello, world!" }'Core Features
Basic Usage
Learn the fundamentals of making requests with simple text input and handling responses.
Reasoning
Access advanced reasoning capabilities with configurable effort levels and encrypted reasoning chains.
Tool Calling
Integrate function calling with support for parallel execution and complex tool interactions.
Web Search
Enable web search capabilities with real-time information retrieval and citation annotations.
Error Handling
The API returns structured error responses:
{ "error": { "code": "invalid_prompt", "message": "Missing required parameter: 'model'." }, "metadata": null}For comprehensive error handling guidance, see Error Handling.
Rate Limits
Standard ModelGates rate limits apply. See API Limits for details.