{
  "openapi": "3.0.3",
  "info": {
    "title": "Inteligencia.ai Public Discovery API",
    "version": "1.0.0",
    "description": "Read-only discovery of editorially approved Latin American AI providers. Vendor claims are not independent tests; selective coverage is not a market ranking. No accounts, payments, publishing, saved lists or private research access."
  },
  "servers": [
    {
      "url": "https://inteligencia.ai"
    }
  ],
  "security": [],
  "paths": {
    "/api/agent": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "Inspect read-only connector capabilities",
        "responses": {
          "200": {
            "description": "Capability names, documentation and request schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "queryInteligencia",
        "summary": "Find, inspect or compare published providers, or inspect coverage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentRequest"
              },
              "example": {
                "action": "search_providers",
                "arguments": {
                  "country": "BR",
                  "use_case": "support",
                  "locale": "pt-br",
                  "limit": 10
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published catalogue results, including evidence limits. No side effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid action or arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Published provider not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 16 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "search_providers"
                ]
              },
              "arguments": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Short keywords; all words must occur in displayed text."
                  },
                  "country": {
                    "type": "string",
                    "enum": [
                      "MX",
                      "CO",
                      "CL",
                      "BR"
                    ]
                  },
                  "use_case": {
                    "type": "string",
                    "enum": [
                      "sales",
                      "support",
                      "training",
                      "research"
                    ]
                  },
                  "integration": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80,
                    "description": "Text mention, not verified compatibility. Read qualifiers."
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "es",
                      "pt-br",
                      "pt-pt"
                    ],
                    "default": "es"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 10
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "default": 0
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "action",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "get_provider"
                ]
              },
              "arguments": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "es",
                      "pt-br",
                      "pt-pt"
                    ],
                    "default": "es"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "action",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "compare_providers"
                ]
              },
              "arguments": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "minItems": 2,
                    "maxItems": 4,
                    "uniqueItems": true
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "es",
                      "pt-br",
                      "pt-pt"
                    ],
                    "default": "es"
                  }
                },
                "required": [
                  "ids"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "action",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "get_coverage"
                ]
              },
              "arguments": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "action",
              "arguments"
            ],
            "additionalProperties": false
          }
        ]
      },
      "AgentResponse": {
        "type": "object",
        "required": [
          "api_version",
          "retrieved_at",
          "scope",
          "limitations"
        ],
        "properties": {
          "api_version": {
            "type": "string"
          },
          "retrieved_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string",
            "enum": [
              "published_only"
            ]
          },
          "limitations": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Provider"
            }
          },
          "total_matches": {
            "type": "integer"
          },
          "next_offset": {
            "type": "integer",
            "nullable": true
          },
          "catalogue_truncated": {
            "type": "boolean"
          },
          "matching": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "unavailable_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison_method": {
            "type": "string"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coverage": {
            "type": "string"
          },
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              },
              "required": [],
              "additionalProperties": false
            }
          }
        }
      },
      "Provider": {
        "type": "object",
        "description": "Public approved provider only. No suitability score. Null or explicit unknown text means insufficient evidence, not absence of capability.",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "enum": [
              "MX",
              "CO",
              "CL",
              "BR"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "Empresa"
            ]
          },
          "sector": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "country_relationship": {
            "type": "string",
            "nullable": true
          },
          "use_cases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facts": {
            "type": "object",
            "properties": {
              "markets": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "evidence_status": {
                    "type": "string",
                    "enum": [
                      "not_recorded",
                      "editorial_text"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "evidence_status",
                  "basis"
                ],
                "additionalProperties": false
              },
              "languages": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "evidence_status": {
                    "type": "string",
                    "enum": [
                      "not_recorded",
                      "editorial_text"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "evidence_status",
                  "basis"
                ],
                "additionalProperties": false
              },
              "integrations": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "evidence_status": {
                    "type": "string",
                    "enum": [
                      "not_recorded",
                      "editorial_text"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "evidence_status",
                  "basis"
                ],
                "additionalProperties": false
              },
              "pricing": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "evidence_status": {
                    "type": "string",
                    "enum": [
                      "not_recorded",
                      "editorial_text"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "evidence_status",
                  "basis"
                ],
                "additionalProperties": false
              },
              "customers": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "evidence_status": {
                    "type": "string",
                    "enum": [
                      "not_recorded",
                      "editorial_text"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "evidence_status",
                  "basis"
                ],
                "additionalProperties": false
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "evidence": {
            "type": "object",
            "properties": {
              "paraphrase": {
                "type": "string",
                "nullable": true
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "supporting_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "original_language": {
                "type": "string",
                "nullable": true
              },
              "original_paraphrase": {
                "type": "string",
                "nullable": true
              },
              "source_published_on": {
                "type": "string",
                "format": "date",
                "nullable": true
              },
              "last_editorial_review_at": {
                "type": "string",
                "nullable": true
              },
              "review_age_days": {
                "type": "integer",
                "nullable": true
              }
            }
          },
          "record_version": {
            "type": "integer"
          },
          "requested_locale": {
            "type": "string",
            "enum": [
              "es",
              "pt-br",
              "pt-pt"
            ],
            "default": "es"
          },
          "content_locale": {
            "type": "string",
            "enum": [
              "es",
              "pt-br",
              "pt-pt"
            ],
            "default": "es"
          },
          "translation_available": {
            "type": "boolean"
          },
          "profile_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
