{
  "openapi": "3.1.0",
  "info": {
    "title": "Reprompt API v2",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.reprompt.io/v2",
      "description": "V2 API server"
    }
  ],
  "paths": {
    "/enrich": {
      "post": {
        "tags": [
          "Enrichments"
        ],
        "summary": "Enrich",
        "description": "Enrich a single place live",
        "operationId": "enrich_enrich_post",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "org_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Org Slug"
            }
          },
          {
            "name": "apiKey",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Apikey"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2EnrichRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/attributes": {
      "get": {
        "tags": [
          "Enrichments"
        ],
        "summary": "List Attributes",
        "description": "List available attributes including custom attributes",
        "operationId": "list_attributes_attributes_get",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "org_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Org Slug"
            }
          },
          {
            "name": "apiKey",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Apikey"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2AttributesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnrichInputObject": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Name of the place.",
            "example": "Joe's Pizza"
          },
          "latitude": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latitude",
            "description": "Latitude coordinate.",
            "example": 40.7359
          },
          "longitude": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Longitude",
            "description": "Longitude coordinate.",
            "example": -73.9911
          },
          "full_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Address",
            "description": "Full address of the place.",
            "example": "7 Carmine St, New York, NY 10014"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "EnrichInputObject",
        "description": "Typed input object for the /enrich endpoint.\n\nExplicit fields generate named properties in the OpenAPI schema so that\nMintlify (and other playgrounds) can render and prefill form fields.\n``extra=\"allow\"`` lets callers pass arbitrary additional keys (e.g.\n``test_query``, ``simulate_error``) required by other enrichment types.\n\nAll fields are Optional because different attribute_keys require different\nsubsets (e.g. reverse_geocode needs only lat/lng, forward_geocode needs\nname+address).  Per-attribute validation is enforced downstream via\nATTRIBUTE_INPUT_REQUIREMENTS and build_required_inputs_model()."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "V2AttributeDetails": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "function_signatures": {
            "items": {
              "$ref": "#/components/schemas/V2AttributeFunctionSignature"
            },
            "type": "array",
            "title": "Function Signatures"
          },
          "enrichment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Type"
          },
          "generic_api_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generic Api Config"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "favicon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Favicon"
          }
        },
        "type": "object",
        "required": [
          "key",
          "name",
          "description",
          "function_signatures"
        ],
        "title": "V2AttributeDetails",
        "description": "Detailed information about a single attribute"
      },
      "V2AttributeFunctionSignature": {
        "properties": {
          "required_inputs": {
            "items": {
              "$ref": "#/components/schemas/V2InputField"
            },
            "type": "array",
            "title": "Required Inputs"
          },
          "optional_inputs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/V2InputField"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Optional Inputs"
          },
          "output_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Output Schema"
          },
          "example_output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Example Output"
          },
          "credit_cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credit Cost"
          }
        },
        "type": "object",
        "required": [
          "required_inputs",
          "output_schema"
        ],
        "title": "V2AttributeFunctionSignature"
      },
      "V2AttributesResponse": {
        "properties": {
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/V2AttributeDetails"
            },
            "type": "array",
            "title": "Attributes"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          }
        },
        "type": "object",
        "required": [
          "attributes",
          "total_count"
        ],
        "title": "V2AttributesResponse",
        "description": "Response for the /attributes endpoint"
      },
      "V2EnrichRequest": {
        "properties": {
          "inputs": {
            "$ref": "#/components/schemas/EnrichInputObject",
            "description": "Input data for the enrichment (keys depend on attribute_key).",
            "example": {
              "full_address": "7 Carmine St, New York, NY 10014",
              "latitude": 40.7359,
              "longitude": -73.9911,
              "name": "Joe's Pizza"
            }
          },
          "attribute_key": {
            "type": "string",
            "title": "Attribute Key",
            "description": "Key identifying the enrichment to run. See `GET /v2/attributes` for the full list of available keys and their required inputs."
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Optional saved agent version to run. Defaults to the active version when omitted."
          }
        },
        "type": "object",
        "required": [
          "inputs",
          "attribute_key"
        ],
        "title": "V2EnrichRequest",
        "description": "Main enrichment request"
      },
      "V2InputField": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "example": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Example"
          }
        },
        "type": "object",
        "required": [
          "name",
          "type",
          "description"
        ],
        "title": "V2InputField",
        "description": "Represents a single input field for an attribute"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token in the format: Bearer YOUR_API_KEY"
      }
    }
  },
  "tags": [
    {
      "name": "Enrichments",
      "description": "Use AI to enrich place data with various attributes"
    },
    {
      "name": "Places",
      "description": "Find, match, and check existence of places"
    }
  ]
}
