{
  "openapi": "3.1.0",
  "info": {
    "title": "A3rbly Arabic parsing API",
    "version": "1.0.0",
    "description": "Public reference for the currently available parsing and diacritization endpoints. Developer access is arranged through https://a3rbly.com/contact. Automated grammatical analyses can have more than one valid interpretation."
  },
  "servers": [{ "url": "https://api.a3rbly.com" }],
  "paths": {
    "/i3rab": {
      "post": {
        "summary": "Analyze an Arabic sentence",
        "parameters": [{
          "name": "x-api-key",
          "in": "header",
          "required": true,
          "description": "Access key issued for this API",
          "schema": { "type": "string" }
        }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["prompt"],
                "properties": {
                  "prompt": { "type": "string", "example": "قرأ الطالب الكتاب" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Analysis result", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } },
          "422": { "description": "Invalid input" }
        }
      }
    },
    "/diacritize": {
      "get": {
        "summary": "Add Arabic diacritics",
        "parameters": [
          { "name": "text", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "x-api-key", "in": "header", "required": true, "description": "Access key issued for this API", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Diacritization result", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } },
          "422": { "description": "Invalid input" }
        }
      }
    }
  }
}
