# RelayStation Ask Document

> RelayStation Ask Document is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-14).

Ask natural-language questions against a document (PDF, image, etc.) and receive grounded, extracted answers using AWS Textract Queries — no OCR pipeline required.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/doc/ask-document
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-ask-document-b34ba562
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7s6r4RBLJImSRLf8htGaa

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability relaystation-ask-document-b34ba562 -d '<json body>'
```

Example prompt: I have a scanned PDF of an invoice — can you ask it these three questions: 'What is the total amount due?', 'What is the invoice date?', and 'Who is the vendor?' and give me the answers?

## When to prefer this

Choose this endpoint when you need to extract specific fields or answer targeted questions from scanned or digital documents without building or maintaining an OCR pipeline. It is ideal for structured forms, invoices, contracts, IDs, and tax documents where you know exactly what data points you need. Prefer it over general OCR when you want grounded, question-specific answers rather than full-page text dumps.

## Known failure modes

- File too large (inline base64 must be ≤4 MiB; upload key path supports ≤50 MB)
- Document format not supported by Textract
- Questions array empty or exceeds 15 items
- Question string too long (max 200 chars) or too short (min 1 char)
- Low-quality scan yields low-confidence or empty answers
- Network or upstream Textract service error

## How this service works

$0.08/document. Ask natural-language questions of a document and get grounded answers (Textract Queries) — no OCR pipeline to build. 155 tools, one balance — relaystation.ai

## Output

Returns structured answers corresponding to each question posed, grounded in the document's content via Textract Queries — typically key-value pairs or extracted text spans per question, without requiring a custom OCR pipeline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      },
      "questions": {
       "type": "array",
       "items": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       },
       "maxItems": 15,
       "minItems": 1
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-ask-document-b34ba562/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
