Back to Blog

Fable 5.2 vs Astra API: Comparing PDF Evidence

Tutorials and Guides4221
Fable 5.2 vs Astra API: Comparing PDF Evidence

Consider a maintenance assistant answering a question about an equipment manual. The sentence is fluent, the model is expensive, and the response arrives without an API error. Then a technician opens the cited page and finds that the operating limit belongs to a different product variant.

That is the comparison problem facing teams evaluating Fable 5.2 vs Astra for document applications. They need answers tied to the correct page, document revision, and visual context. A general intelligence score does not establish that a particular PDF workflow meets those requirements.

This article proposes a practical selection memo for Claude Fable 5.2 and GPT-6 Astra. It does not report an invented head-to-head benchmark. The goal is to give both APIs the same evidence, expose representation differences, and decide which integration produces answers your users can verify with acceptable review effort.

The distinction matters for an AI API relay as well. A route that supports text chat has not demonstrated that it preserves PDF inputs, image-processing settings, and the response information your document interface needs.

The buying question begins with one document packet

Imagine a software company building an assistant for equipment distributors. Its users need to find operating limits, maintenance intervals, and differences between product variants. They already have the manuals. The application should help them inspect those manuals more efficiently.

Create a small fictional packet before selecting a model. Include a text-based PDF, a scanned page, a table that continues onto another page, and two revisions of the same manual. Add a question that the documents cannot answer. These are proposed test cases, not claims about either model's measured behavior.

For example, use a fictional pump called P-17. One table describes the standard unit; a footnote changes the inspection interval under continuous operation. A revised manual changes one operating limit. A question about outdoor certification has no answer in the packet.

The reviewer should know the expected result for every question. Record the authoritative revision, physical PDF page, relevant passage or visual region, and any necessary qualification. If the team cannot agree on the expected answer, the example is not yet suitable for comparing models.

Keep ordinary cases alongside difficult ones. A collection containing only obscure footnotes can exaggerate the importance of a rare failure. A collection containing only clean paragraphs will miss the conditions that cause expensive corrections after deployment.

This packet is specific to document evidence. For a different problem, such as checking whether extracted invoice totals are mathematically consistent, use the separate invoice JSON arithmetic-validation guide. A correctly located passage and a correct calculation are distinct acceptance criteria.

Compare the documented input contracts before the answers

Anthropic identifies the model as `claude-fable-5-2`. OpenAI identifies the model in this comparison as `gpt-6-astra`. Record those exact upstream targets, along with any gateway alias used by your account.

Do not silently replace GPT-6 Astra with a newer Astra generation and retain the old comparison label. The site's GPT-6.2 Astra and Sol release discussion concerns a different release. A newer model can enter the same evaluation, but it needs its own result row.

The providers expose different document request structures:

DecisionFable through Claude MessagesAstra through OpenAI Responses
Inline PDF representationA document block with a PDF sourceAn input_file item containing file data
Relevant input documentationClaude PDF supportOpenAI file inputs
Page evidenceNative citation features are available through the documented Claude interfaceDefine and verify the evidence representation used by your application
Visual-processing configurationFollow the current PDF route requirementsResponses supports a PDF detail setting
Fair comparison recordDocument bytes, instructions, model, settings, routeThe same records, including explicit PDF detail

Anthropic's PDF support guide describes processing text and visual document content. OpenAI's file-input documentation explains its PDF input and detail controls. In the latter, detail changes page-image processing while extracted PDF text remains included.

This produces a useful experiment: compare native PDF input with a text-only representation of the same document. Treat them as separate conditions. If an application removes the chart before the request reaches the model, a missing chart fact is not evidence that the model failed to read an image it never received.

Also record file-size limits at the actual access route. A provider's published allowance does not automatically apply to every proxy, client, or deployment. The existing Responses API 413 troubleshooting guide is relevant when the document is rejected before the model can analyze it.

Use identical PDF bytes without pretending the APIs are identical

The following Python example builds two native request bodies from one PDF. It does not send a request, incur API charges, or claim that every gateway supports these fields. Its purpose is to keep the document constant while making the request formats explicit.

Save it as build_pdf_comparison.py, then run it with a small sample PDF:

bash
python build_pdf_comparison.py sample-manual.pdf
python
import base64
import hashlib
import json
import sys
from pathlib import Path

PROMPT = """Use only the attached manual.
Q1: What operating temperature range is stated for P-17?
Q2: What inspection interval applies during continuous operation?
Q3: Does the manual establish outdoor certification?
For each answer, give the physical PDF page number and supporting
passage, including relevant exceptions. Count the first PDF page as 1.
If the document does not establish an answer, say 'not established'.
Do not substitute a different product variant or infer certification.
"""

def build_requests(pdf_bytes, filename):
    if not pdf_bytes.startswith(b"%PDF-"):
        raise ValueError("Expected a PDF header; this is not full PDF validation")
    encoded = base64.b64encode(pdf_bytes).decode("ascii")
    fable = {
        "model": "claude-fable-5-2",
        "max_tokens": 4096,
        "messages": [{"role": "user", "content": [
            {"type": "document", "source": {
                "type": "base64", "media_type": "application/pdf",
                "data": encoded}},
            {"type": "text", "text": PROMPT},
        ]}],
    }
    astra = {
        "model": "gpt-6-astra",
        "max_output_tokens": 4096,
        "input": [{"role": "user", "content": [
            {"type": "input_file", "filename": filename,
             "file_data": "data:application/pdf;base64," + encoded,
             "detail": "high"},
            {"type": "input_text", "text": PROMPT},
        ]}],
    }
    return {"fable": fable, "astra": astra}

if __name__ == "__main__":
    source = Path(sys.argv[1])
    data = source.read_bytes()
    target = Path("pdf-comparison-requests")
    target.mkdir(exist_ok=True)
    for name, payload in build_requests(data, source.name).items():
        (target / f"{name}.json").write_text(
            json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps({"sha256": hashlib.sha256(data).hexdigest(),
                      "bytes": len(data), "directory": str(target)}))

These are input-contract examples, not fully matched benchmark settings. Equal numeric output limits do not equalize reasoning effort, available answer space, or cost. Select and record the reasoning configuration for each model separately, and inspect completion status before scoring an answer.

The code checks only the file signature. It does not validate every PDF structure or generate the fictional manual. Prepare and inspect the sample document yourself. The generated request files contain the document data, so handle them like the original file.

When a route uses different model aliases or excludes a native field, adapt the request according to its documentation and record the change. Do not label a text-only replacement as the same PDF experiment.

For repeated document access, file reuse is a separate implementation decision. The Claude Files API document-reuse article addresses that lifecycle. Start with the fixed input above before adding upload reuse, document replacement, or deletion behavior.

Score the answer and the evidence separately

A reviewer needs two judgments: whether the answer is correct and whether the supplied evidence supports it. Combining them into one general satisfaction score hides useful differences.

For every answer, inspect the product variant, value, unit, exception, document revision, and location. A correct number attached to the wrong unit fails. A correct interval without its continuous-operation exception fails the corresponding question. An answer that declines to invent a certification can succeed even though it is less assertive.

Page numbering needs an explicit convention. The physical third page of a PDF may display the printed label “1” after a cover and contents page. Ask for physical PDF pages in the comparison, then let the application show printed labels separately when available.

For Claude, the native citations documentation describes PDF page references with one-based numbering and exclusive end indices. That is different from an application asking a model to type “page 3.” The sample code above uses prompted references for both models; it does not enable native citations. Evaluate a citation-enabled Claude configuration as a separately named condition.

For Astra, you may choose an application-defined evidence object containing a document ID, page, quotation, and answer. OpenAI's Structured Outputs guide is useful for specifying the shape. Schema compliance still does not establish that a quotation exists or that it supports the conclusion. Verify those properties against the source.

Avoid awarding points merely for returning more references. One precise passage covering the claim and its qualification can be more useful than several loosely relevant pages. Measure the review effort required to confirm the answer, because that is part of the product's operating cost.

Add one deliberate intervention when a model fails. If a scanned footnote is missed, repeat the same question with a clearly legible rendering of that page while preserving the wording. If the revised answer becomes correct, investigate image legibility and preprocessing before attributing the failure to general reasoning. If the answer remains wrong despite clear evidence, examine whether it confuses variants or applies the wrong condition.

A second intervention tests revision handling. Present the current manual alone, then present it together with an obsolete revision and an explicit instruction about which is authoritative. The difference reveals whether the application needs stronger document selection before generation. Do not quietly remove the obsolete file only for one model and call the resulting answers comparable.

These interventions turn an unsuccessful comparison into an implementation decision. They can suggest better scanning, narrower document retrieval, or clearer revision metadata. Record the intervention as a new configuration, keeping the original result available. Otherwise a growing set of manual fixes can make an unsuitable default look production-ready.

The decision memo should show where each configuration works

Summarize results by document condition rather than announcing a universal winner. Separate clean text, scans, dense tables, cross-page evidence, conflicting revisions, and unanswered questions. Keep incomplete responses and input failures visible instead of dropping them from the denominator.

Use the same question set and blind the model labels during human review where practical. Repeat enough cases to distinguish a consistent pattern from one unusually good response. A small internal packet can support a limited deployment decision; it cannot establish global superiority across all PDFs.

Measure full request cost and the time spent correcting accepted-looking mistakes. The relevant unit might be cost per verified answer or minutes of review per document. Do not infer the bill solely from visible answer length, and do not assume that uploading a document once makes subsequent analysis free.

If repeated prompts are part of the application, test reuse separately. The Claude prompt-cache verification guide explains a related measurement problem. Cache savings should not conceal a change in the document or evidence shown to the model.

At the gateway boundary, ask whether the selected route accepts the intended document form, preserves required response fields, and exposes enough usage information for the comparison. The AI API gateway evaluation framework provides broader procurement context; this memo should remain centered on Fable and Astra document results.

For a 4SAPI evaluation, start with the model and route actually available to your project. Run this packet before moving a large document workload. The outcome should be an approved configuration with recorded limitations, not a claim that every PDF feature works because a model appears in a catalog.

Questions from a document-application buyer

Which is better for PDFs, Fable 5.2 or GPT-6 Astra?

The official documentation establishes relevant capabilities, but it does not settle your document workload. Compare the exact input representation, required evidence, and review burden. This article supplies an evaluation method rather than unsupported winner claims.

Can we compare one model using PDF and the other using extracted text?

Yes, if the decision is between those complete application configurations. Label the difference clearly. It is not a controlled comparison of the two models receiving equivalent visual evidence.

Should every answer contain a page number?

Supported answers should offer a verifiable location under your chosen interface contract. An unanswered question should remain unanswered. Requiring a page number even when evidence is absent encourages a misleading appearance of precision.

What would justify expanding the pilot?

A documented configuration that passes the agreed cases, exposes failures clearly, and keeps review effort within your operating target. Expand by document category, then rerun the packet when the model, parser, or gateway route changes.

Official references

  1. Anthropic: Claude Fable model and API identifier
  2. OpenAI: GPT-6 Astra model
  3. Anthropic: PDF support
  4. OpenAI: file inputs and PDF detail
  5. Anthropic: citations and page indices
  6. OpenAI: Structured Outputs

<!-- ARTICLE_1_END -->

Tags:Fable 5.2 vs Astra API PDF comparisonfable 5.2 vs astrafable 5.2 vs astra 6Fable vs GPT-6 Astra document analysis

Recommended reading

Explore more frontier insights and industry know-how.