Skip to main content
The REST API provides a single HTTP endpoint, used for querying your knowledge base with natural language. This endpoint is a wrapper around the ask_agent tool in our MCP. For advanced use cases and a more comprehensive understanding of our API, see the MCP API documentation.
Since this endpoint is a wrapper over the MCP ask_agent tool, the latency may be high for each request - assume multiple minutes in your application.

Endpoint

POST https://api.getgrapevine.ai/v1/ask

Request

query
string
required
The natural language question

Response

{
  "answer": "Our pricing strategy focuses on value-based pricing... [[1]](https://notion.so/pricing-strategy) [[2]](https://docs.google.com/document/d/xyz)"
}
answer
string
The generated answer with inline citations as numbered markdown links [[N]](url)

Examples

Basic query

curl -X POST https://api.getgrapevine.ai/v1/ask \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is our return policy?"
  }'