{
  "openapi": "3.1.0",
  "info": {
    "title": "Content SEO AI API",
    "version": "1.0.0",
    "description": "Generate SEO articles, research keywords, audit pages and submit URLs to IndexNow. Same tools as the MCP server at https://content-seo.ai/mcp. Business plan; keys are created in the app (API & clés).",
    "contact": {
      "email": "support@neotechrams.com",
      "url": "https://content-seo.ai/api-docs"
    }
  },
  "servers": [
    {
      "url": "https://content-seo.ai/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "getAccount",
        "summary": "Compte et quotas",
        "description": "Returns the plan of the API key owner and this month's usage of each quota.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/content/generate": {
      "post": {
        "operationId": "generateContent",
        "summary": "Générer un article SEO",
        "description": "Writes an SEO-optimised article (title, meta description, outline, full body, FAQ) for a topic. Uses 1 content credit.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "type": "string",
                    "description": "Subject or main query the article must answer"
                  },
                  "keywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Secondary keywords to cover"
                  },
                  "language": {
                    "type": "string",
                    "description": "ISO language code, default fr",
                    "default": "fr"
                  },
                  "tone": {
                    "type": "string",
                    "description": "e.g. professionnel, pédagogique, conversationnel",
                    "default": "professionnel"
                  },
                  "length": {
                    "type": "string",
                    "enum": [
                      "short",
                      "medium",
                      "long"
                    ],
                    "default": "medium"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "html",
                      "markdown"
                    ],
                    "default": "html"
                  },
                  "audience": {
                    "type": "string",
                    "description": "Who the article is for"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "gemini",
                      "mistral",
                      "deepseek"
                    ]
                  }
                },
                "required": [
                  "topic"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/keywords/research": {
      "get": {
        "operationId": "keywordResearch",
        "summary": "Recherche de mots-clés",
        "description": "Keyword ideas around a seed keyword with Google search volume, CPC, competition and difficulty. Uses 1 keyword/backlink credit.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Seed keyword"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "fr"
            },
            "description": "fr, be, ch, ca, us, gb, de, es, it"
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "fr"
            },
            "description": "ISO language code, default fr"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ]
      }
    },
    "/audit/analyze": {
      "post": {
        "operationId": "auditPage",
        "summary": "Audit SEO d'une page",
        "description": "Fetches a public URL and audits its on-page SEO: title, meta description, headings, canonical, robots, structured data, images, links, sitemap. Returns a 0-100 score and prioritised issues. Uses 1 audit credit.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Public http(s) URL"
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/indexing/submit": {
      "post": {
        "operationId": "submitIndexnow",
        "summary": "Soumettre des URLs à IndexNow",
        "description": "Submits URLs of one site to IndexNow (Bing, Yandex, Seznam, Naver…). The key file https://<site>/<key>.txt must already be online. Free.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "site_url": {
                    "type": "string",
                    "description": "Site home, e.g. https://example.com"
                  },
                  "key": {
                    "type": "string",
                    "description": "Your IndexNow key (8-128 letters, digits or dashes)"
                  },
                  "urls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 10000
                  }
                },
                "required": [
                  "site_url",
                  "key",
                  "urls"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "csa_live_…"
      }
    },
    "responses": {
      "Error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "message"
              ]
            }
          }
        }
      }
    }
  }
}
