{
  "openapi": "3.1.0",
  "info": {
    "title": "AGR Studio: project inquiries and the AI visibility check",
    "version": "1.0.0",
    "description": "Lets an AI assistant send AGR Studio a project inquiry for the person it is helping. Only send what that person asked you to send, with their real contact details. To book a call instead, open https://cal.com/artyum/20min?utm_source=ai-assistant&utm_medium=agr.studio&name=<name>&email=<email>&notes=<notes>. You can also check whether AI assistants and search engines can read a website with GET /api/ai-check.",
    "contact": {
      "email": "hello@agr.studio",
      "url": "https://agr.studio/contact"
    }
  },
  "servers": [
    {
      "url": "https://agr.studio"
    }
  ],
  "paths": {
    "/api/inquiry": {
      "get": {
        "operationId": "inquiryInstructions",
        "summary": "Plain-language instructions for sending an inquiry",
        "responses": {
          "200": {
            "description": "Instructions as JSON"
          }
        }
      },
      "post": {
        "operationId": "sendInquiry",
        "summary": "Send a project inquiry; AGR Studio replies by email within one business day",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "company",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 200
                  },
                  "company": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "message": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 4000,
                    "description": "What the company does and what they want to build, change or fix"
                  },
                  "needs": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "new-site",
                        "redesign",
                        "brand",
                        "migration",
                        "ongoing",
                        "not-sure"
                      ]
                    }
                  },
                  "timeline": {
                    "type": "string",
                    "enum": [
                      "4-6-weeks",
                      "1-2-months",
                      "later"
                    ]
                  },
                  "budget": {
                    "type": "string",
                    "enum": [
                      "under-5k",
                      "5-10k",
                      "10-25k",
                      "25-50k",
                      "50k-plus",
                      "open"
                    ],
                    "description": "USD"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "founder",
                      "marketing",
                      "design",
                      "other"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "google",
                      "chatgpt",
                      "gemini",
                      "claude",
                      "perplexity",
                      "ai-assistant",
                      "linkedin",
                      "x",
                      "framer",
                      "contra",
                      "upwork",
                      "directory",
                      "referral",
                      "other"
                    ]
                  },
                  "sourceDetail": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "lang": {
                    "type": "string",
                    "enum": [
                      "en",
                      "he"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid fields; `fields` lists them"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited: 5 per hour per sender"
          }
        }
      }
    },
    "/api/ai-check": {
      "get": {
        "operationId": "checkAiVisibility",
        "summary": "Check whether ChatGPT, Claude, Perplexity and Google can read a website",
        "description": "Fetches the page and its robots.txt, sitemap and llms.txt, and returns nine checks in this order: reach, aiSearch, aiTraining, search, html, meta, schema, sitemap, llms. Each has a status (pass, warn, fail or info) and data such as blocked crawlers or the word count in the HTML. The same check people run at https://agr.studio/ai-check. Only the checked site and its result are kept, nothing about who asked. 12 checks per 10 minutes per client.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "A domain or full URL, e.g. acme.com or https://acme.com/pricing",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "he"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "url": {
                      "type": "string",
                      "description": "Final URL after redirects"
                    },
                    "host": {
                      "type": "string"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "status"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "reach",
                              "aiSearch",
                              "aiTraining",
                              "search",
                              "html",
                              "meta",
                              "schema",
                              "sitemap",
                              "llms"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pass",
                              "warn",
                              "fail",
                              "info"
                            ]
                          },
                          "data": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`{ok:false, error:\"invalid\"}` (not a web address) or `{ok:false, error:\"blocked\"}` (private or non-standard address)"
          },
          "429": {
            "description": "`{ok:false, error:\"rate\"}`: too many checks"
          },
          "502": {
            "description": "`{ok:false, error:\"unreachable\"}`: the site didn't answer in time"
          }
        }
      }
    }
  }
}
