{
	"openapi": "3.1.0",
	"info": {
		"title": "Stogas Gateway API",
		"summary": "OpenAI-compatible public API gateway.",
		"description": "The Stogas Gateway exposes an OpenAI-compatible surface. Authenticate requests with your Stogas API key, and the gateway will relay the request to the configured upstream provider.",
		"version": "1.0.0"
	},
	"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
	"servers": [
		{
			"url": "{serverUrl}",
			"description": "Gateway origin. Endpoint paths include their API version.",
			"variables": {
				"serverUrl": {
					"default": "https://api.stogas.ai"
				}
			}
		}
	],
	"paths": {
		"/v1/models": {
			"get": {
				"operationId": "listModels",
				"tags": [
					"Catalog"
				],
				"summary": "List Models",
				"description": "Returns an OpenAI-compatible list of catalog model IDs accepted by the gateway.",
				"security": [],
				"responses": {
					"200": {
						"description": "OpenAI-compatible model list.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ModelListResponse"
								},
								"examples": {
									"models": {
										"value": {
											"object": "list",
											"data": [
												{
													"id": "gpt-5.5-latest",
													"object": "model",
													"created": 1,
													"owned_by": "stogas"
												}
											]
										}
									}
								}
							}
						}
					},
					"500": {
						"$ref": "#/components/responses/CatalogUnavailable"
					}
				}
			}
		}
	},
	"components": {
		"schemas": {
			"ModelListResponse": {
				"type": "object",
				"required": [
					"object",
					"data"
				],
				"properties": {
					"object": {
						"type": "string",
						"const": "list"
					},
					"data": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/ModelObject"
						}
					}
				}
			},
			"ModelObject": {
				"type": "object",
				"required": [
					"id",
					"object",
					"created",
					"owned_by"
				],
				"properties": {
					"id": {
						"type": "string",
						"description": "Model ID or alias accepted by the gateway."
					},
					"object": {
						"type": "string",
						"const": "model"
					},
					"created": {
						"type": "integer",
						"description": "Stable OpenAI-compatible creation timestamp."
					},
					"owned_by": {
						"type": "string",
						"example": "stogas"
					}
				}
			},
			"ErrorResponse": {
				"type": "object",
				"properties": {
					"error": {
						"type": "object",
						"properties": {
							"message": {
								"type": "string"
							},
							"type": {
								"type": "string"
							}
						}
					}
				}
			}
		},
		"responses": {
			"CatalogUnavailable": {
				"description": "<span className=\"text-red-500 font-bold\">Internal Server Error:</span> The gateway catalog is not available.",
				"content": {
					"application/json": {
						"schema": {
							"$ref": "#/components/schemas/ErrorResponse"
						},
						"example": {
							"error": {
								"message": "Catalog unavailable",
								"type": "internal_error"
							}
						}
					}
				}
			}
		}
	},
	"tags": [
		{
			"name": "Catalog",
			"description": "Public model and routing discovery."
		}
	]
}