Docs
HTTP API
Use the Scry HTTP API for context, schema discovery, bounded read-only SQL, reranking, and web search.
Base URL and authentication
The API base is https://api.scry.io. Send Authorization: Bearer $SCRY_API_KEY on authenticated routes. GET /v1/scry/context is public. Schema, rerank, and web-search requests accept a signed-in session or a Scry key; SQL queries use a Scry key or the supported x402 payment path.
Context and schema
GET /v1/scry/context?mode=agent returns the compact session-start contract. POST /v1/scry/context is not a registered route. GET /v1/scry/schema returns relation and helper contracts; use ?relation=<name>[,<name>] for selected full contracts or ?mode=index for the catalog index.
Query
POST /v1/scry/query accepts one read-only ClickHouse statement. Send the SQL as a UTF-8 text/plain body. The server also accepts text/sql, application/sql, or an application/json object containing only a string sql field. A literal LIMIT bounds ordinary result sets; begin at LIMIT 20. The JSON response carries rows, execution details, truncation state, and accounting fields. Long queries can stream JSON whitespace before the response object.
curl https://api.scry.io/v1/scry/query \ -H "Authorization: Bearer $SCRY_API_KEY" \ -H "Content-Type: text/plain" \ --data "SELECT hn_id, title, original_author, original_timestamp, uri FROM hackernews.items WHERE title != '' ORDER BY hn_id DESC LIMIT 20"
Rerank and web search
POST /v1/scry/rerank orders documents supplied by the caller. POST /v1/scry/web searches configured open-web providers and returns normalized results with provider status. Both routes accept JSON and require authentication.
When to use MCP
Prefer MCP when an agent can connect to https://mcp.scry.io. MCP handles OAuth, exposes the current tool contracts, and keeps context, schema, query, search, and fetch in one client-native interface. Use HTTP for services, scripts, and clients without MCP support.