Documentation /docs/playground

Playground

The hosted playground is the fastest way to validate parsing, extraction, and review behavior before wiring the API into your own stack.

  • Start in the playground when you are evaluating parsing, extraction, Ask, Compare, or Synthesize quality.
  • Upload representative documents and confirm the result shape, grounding evidence, and failure behavior.
  • Use Get API Code on the active tab to inspect the production endpoint, headers, and request body that match the visible workflow.
  • Move into the API once you know the document class, Schema V2 shape, grounding mode, and execution mode you want to productionize.

Handoff path

  1. Validate output in the playground
  2. Export or copy the schema contract you want to use
  3. Open Get API Code on the active Playground tab
  4. Replace playground file IDs with your own uploaded files[0].file_id values
  5. Reproduce the same flow with the public API endpoint shown in the snippet

The public docs at api.docspeed.ai/docs are the canonical reference surface for production contracts. The playground is the fastest evaluation surface.

Playground tab mapping

| Playground tab | Production endpoint | | --- | --- | | Upload | POST /api/v1/upload | | Ask | POST /api/v1/ask | | Compare | POST /api/v1/compare | | Parse | POST /api/v1/parse | | Extract | POST /v1/extract | | OCR | POST /v1/ocr | | Auto Schema | POST /v1/schema/auto | | Classify | POST /v1/classify | | Split | POST /v1/split | | Layout | POST /v1/layout | | Tables | POST /v1/tables | | Equations | POST /v1/equations | | Charts | POST /v1/charts | | Synthesize One | POST /api/v1/synthesize/one | | Synthesize Set | POST /api/v1/synthesize/set |

Schema handoff

Schema Builder and Extract use Schema V2:

{
  "doc_class": "invoice",
  "fields": [
    {"key": "invoice.invoice_number", "description": "Invoice identifier", "type": "string", "array": false}
  ],
  "tables": []
}

The same schema object can be:

  • copied from Auto Schema output into Extract
  • saved in your own schema registry
  • uploaded as a JSON schema file and referenced with schema_file_id for Extract

Auth boundary

The playground may require sign-in to run metered endpoints. That login is separate from production API keys. Production integrations should use bearer auth from a server-side environment as described in Authentication & API Keys.

cURL

curl -sS -X POST "https://api.docspeed.ai/api/v1/compare" \
  -H "Authorization: Bearer ${DOCSPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": ["file_invoice", "file_purchase_order"],
    "execution_mode": "sync",
    "schema": "auto"
  }'

Python

import requests

response = requests.post(
    "https://api.docspeed.ai/api/v1/compare",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "file_ids": ["file_invoice", "file_purchase_order"],
        "execution_mode": "sync",
        "schema": "auto",
    },
    timeout=600,
)
print(response.json())

TypeScript

const response = await fetch("https://api.docspeed.ai/api/v1/compare", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    file_ids: ["file_invoice", "file_purchase_order"],
    execution_mode: "sync",
    schema: "auto",
  }),
});

console.log(await response.json());