Overview
The Pulse Playground is designed for building and testing your extraction pipeline visually. Once you’re happy with the results, the Show Code feature generates ready-to-run SDK code that reproduces your exact configuration — making the transition from Playground to production seamless.The Show Code Feature
Set up your extraction settings, split topics, and/or schema in the Playground as you normally would. Run it on a sample document to verify the results.
Click the
</> Show Code button in the pipeline configuration panel. A modal opens with generated code matching your exact configuration.What Gets Included
The generated code reflects your exact Playground configuration:| Setting | Included? |
|---|---|
| Page range | ✅ If set |
| Figure extraction | ✅ If enabled |
| Figure descriptions | ✅ If enabled |
| Show images | ✅ If enabled |
| Return HTML | ✅ If enabled |
| Effort mode | ✅ If enabled |
| Chunking settings | ✅ If configured |
| Chunk size | ✅ If set |
| Split topics | ✅ If split step added |
| Schema (single mode) | ✅ If schema step added |
| Per-topic schemas (split mode) | ✅ If split + schema configured |
| Saved preset IDs | ✅ Uses config IDs when presets are loaded |
Generated Code Examples
Extract Only
- Python
- TypeScript
- curl
Extract → Split → Schema
- Python
- TypeScript
- curl
Using Presets in Production
If your pipeline uses a saved preset (rather than inline configuration), the generated code references the preset’s config ID:- Centralized config — update the preset once, all future runs pick up the change
- Team consistency — everyone references the same validated configuration
- Cleaner code — no need to inline large schemas in every request
If you’ve edited a preset’s settings in the current session without saving, the generated code uses the edited inline settings rather than the preset ID — ensuring the code matches what you see in the Playground.
Production Best Practices
Use async mode for production workloads
Use async mode for production workloads
Always use
async_=True (Python) or async: true (TypeScript/curl) in production. This returns immediately with a job_id that you poll, preventing request timeouts on large documents.See Async Processing for the polling pattern.Enable storage
Enable storage
Pass
storage={"enabled": True} so Pulse saves the extraction result. This lets you run /split and /schema on the same extraction later without re-processing.Use webhooks for event-driven architectures
Use webhooks for event-driven architectures
Instead of polling, register a webhook URL and Pulse will POST the result to you when processing completes.See Webhooks for setup.
Handle errors gracefully
Handle errors gracefully
The API returns structured error codes. Always check for error responses and implement retry logic for transient failures.See Error Handling for the full error code reference.
Use config IDs for repeatability
Use config IDs for repeatability
If you’re running the same pipeline across many documents, save your settings as presets and use the config IDs. This makes your API calls shorter and your configuration auditable.
