stogas

Responses

Create an OpenAI-compatible Responses API response. The gateway resolves the requested model and route through the compiled Stogas catalog, applies deployment facts such as implied service tier, rejects unsupported parameters, and then relays the request to the configured provider.

POST
/v1/responses

Authorization

AuthorizationBearer <token>

Pass the Stogas API key as Authorization: Bearer <token>. This is the canonical OpenAI-compatible header.

In: header

Header Parameters

X-Stogas-Return-Extra-Fields?string

Comma-separated catalog-defined Stogas metadata fields to include under stogas, such as provider, model_requested, model_deployment, latency, provider_response_headers, raw_request, and raw_response.

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.stogas.ai/v1/responses" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-5.5-latest",    "input": "Reflect on the issue of trusting trust",    "temperature": 0.7  }'
{
  "id": "8ee3487c-e5b1-4fe0-9dd6-84bc23ddd5f7",
  "object": "response",
  "created_at": 1714343120,
  "completed_at": 1714343121,
  "status": "completed",
  "error": null,
  "incomplete_details": null,
  "model": "gpt-5.5",
  "output": [
    {
      "id": "msg_0192f217-35b0-7e2c-9be7-f4cc24f2a4b0",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "You can never fully trust code you did not write yourself."
        }
      ]
    }
  ],
  "output_text": "You can never fully trust code you did not write yourself.",
  "usage": {
    "input_tokens": 9,
    "output_tokens": 11,
    "total_tokens": 20
  }
}
{
  "error": {
    "message": "Invalid text completion request: the 'messages' array cannot be empty.",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "message": "Invalid API key",
    "type": "authentication_error"
  }
}
{
  "error": {
    "message": "Insufficient balance. Please add funds to your Stogas account to continue making requests.",
    "type": "billing_error"
  }
}
{
  "error": {
    "message": "API key is disabled",
    "type": "permission_denied"
  }
}
{
  "error": {
    "message": "Not Found: The requested endpoint '/v1/chat/compl' does not exist.",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "message": "Request already finalized; generate a new requestId",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "message": "Payload Too Large: The request body exceeds the maximum allowed size of 100MB.",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "message": "API key rate limit exceeded",
    "type": "rate_limit_error"
  }
}
{
  "error": {
    "message": "Upstream provider error",
    "type": "gateway_error"
  }
}
{
  "error": {
    "message": "Gateway billing database unavailable",
    "type": "gateway_error"
  }
}