{
  "openapi": "3.1.0",
  "info": {
    "title": "Oxygen Translation API",
    "version": "1.0.0",
    "description": "Standalone translation API. Accepts text or news-like payloads and returns translations in en, ro, sk, es, de, uk."
  },
  "servers": [
    {
      "url": "https://oxygen-translate.datalight.hu"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Healthcheck",
        "responses": {
          "200": {
            "description": "Healthy response"
          }
        }
      }
    },
    "/api/translate": {
      "post": {
        "summary": "Translate text or item payload",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful translation"
          },
          "400": {
            "description": "Validation error"
          },
          "401": {
            "description": "Unauthorized"
          },
          "413": {
            "description": "Payload too large"
          },
          "429": {
            "description": "Daily Cloudflare AI Neuron or OpenAI fallback token limit exceeded"
          },
          "502": {
            "description": "AI upstream error"
          },
          "503": {
            "description": "AI usage limiter unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}