{
  "openapi": "3.1.0",
  "info": {
    "title": "ablaut API",
    "version": "1.0.0",
    "description": "Verb conjugation for 14 European languages. Every form is verified against two independent lexicons per language; unknown verbs are rejected rather than guessed. Docs: https://www.ablaut.dev/api",
    "contact": {
      "url": "https://www.ablaut.dev"
    }
  },
  "servers": [
    {
      "url": "https://api.ablaut.dev"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v1/conjugate": {
      "get": {
        "summary": "Full conjugation table for an infinitive",
        "operationId": "conjugate",
        "parameters": [
          {
            "name": "verb",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The infinitive (or citation form) to conjugate.",
            "example": "appeler"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "de"
            },
            "description": "ISO 639-1 ('fr'), ISO 639-3 ('fra'), or an English name ('French'), case-insensitive.",
            "example": "fr"
          }
        ],
        "responses": {
          "200": {
            "description": "The conjugation table. Its shape is language-specific by design (German carries Konjunktiv rows, Czech aspect pairs, Spanish voseo, Irish composed mutated rows); see https://www.ablaut.dev/api#shapes for the per-language field reference.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "verb",
                    "lang",
                    "us",
                    "table"
                  ],
                  "properties": {
                    "verb": {
                      "type": "string"
                    },
                    "lang": {
                      "type": "string"
                    },
                    "us": {
                      "type": "integer",
                      "description": "Engine compute time in microseconds."
                    },
                    "table": {
                      "type": "object",
                      "description": "Language-specific fields; values are strings or person arrays (1sg through 3pl, nullable for defective slots).",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/languages": {
      "get": {
        "summary": "Supported languages and their maturity status",
        "operationId": "listLanguages",
        "responses": {
          "200": {
            "description": "The 14 languages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "languages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "iso3": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "beta",
                              "wip"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/lemma": {
      "get": {
        "summary": "Reverse lookup: infinitive(s) and slots from a conjugated form",
        "operationId": "reverseLookup",
        "parameters": [
          {
            "name": "form",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "suis"
          },
          {
            "name": "lang",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "fr",
            "description": "ISO 639-1/-3 or English name."
          }
        ],
        "responses": {
          "200": {
            "description": "All lemmas whose paradigm contains the form, with the slots it occupies. Ambiguity is expected (suis: \u00eatre and suivre). Full productive coverage for fr/es/de/en; irregular-index coverage elsewhere.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "form": {
                      "type": "string"
                    },
                    "us": {
                      "type": "integer"
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "infinitive": {
                            "type": "string"
                          },
                          "slots": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Request a key at https://www.ablaut.dev (the API dialog)."
      }
    },
    "responses": {
      "Error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
