Skip to main content
POST
/
v1
/
playground
Playground
curl --request POST \
  --url https://api.example.com/v1/playground \
  --header 'Content-Type: application/json' \
  --header 'Origin: <origin>' \
  --data '
{
  "output_schema": "<string>"
}
'
{
  "object": {},
  "metadata": {},
  "error": {}
}

Overview

The /v1/playground endpoint allows you to test Parsefy without an API key. It’s designed for:
  • Testing and evaluation
  • Demos and proof-of-concept
  • Learning how Parsefy works
The playground has strict rate limits. For production use, join the waitlist to get an API key and use the /v1/extract endpoint.

Request

file
file
required
The document to extract data from.
  • Supported formats: PDF (.pdf), Microsoft Word (.docx)
  • Maximum size: 10 MB
output_schema
string
required
A JSON Schema string defining the structure of data to extract.
Origin
string
required
The origin of the request. Must be from an authorized domain (https://parsefy.io).

Response

The response format is identical to the /v1/extract endpoint:
object
object
The extracted data matching your schema, including _meta with confidence score and issues.
metadata
object
Processing information including tokens, credits, and timing.
error
object
Present only if extraction failed.

Limits

LimitValue
Request Rate1 request per second per IP
Daily Credits10 credits per day per IP
Maximum File Size10 MB
Credits reset at midnight UTC each day.

Example

The playground is available through the Parsefy website. Direct API calls to this endpoint require an authorized origin.

Response

{
  "object": {
    "merchant": "Coffee House",
    "total": 12.50,
    "date": "2024-01-15",
    "_meta": {
      "confidence_score": 0.98,
      "issues": []
    }
  },
  "metadata": {
    "processing_time_ms": 1850,
    "input_tokens": 890,
    "output_tokens": 45,
    "credits": 1,
    "fallback_triggered": false
  }
}

Error Responses

Origin Not Allowed (403)

{
  "detail": "Origin not allowed"
}
This error occurs when the Origin header is missing or from a non-authorized domain. Solution: Use the playground through parsefy.io or join the waitlist to get an API key for direct API access.

Daily Limit Exceeded (429)

{
  "detail": "Daily credit limit exceeded. Resets at midnight UTC."
}
You’ve used all 10 daily credits. Solutions:
  • Wait until midnight UTC for reset
  • Join the waitlist for an API key with unlimited extractions

Rate Limited (429)

{
  "detail": "Rate limit exceeded. Please retry after 1 second."
}
You’re making requests too quickly. Solution: Add at least 1 second delay between requests.

When to Use Playground vs Extract

Use CaseEndpoint
Testing and evaluation/v1/playground
Learning the API/v1/playground
Development/debugging/v1/playground
Production applications/v1/extract
High volume processing/v1/extract
Server-side integrations/v1/extract

Upgrading to Production

Ready to move beyond the playground? Here’s how to switch:
1

Get an API Key

Join the waitlist to get your API key.
2

Update Endpoint

Change from /v1/playground to /v1/extract.
3

Add Authentication

Include the Authorization: Bearer pk_your_key header.
4

Remove Origin Header

The Origin header is not needed for authenticated requests.

Production Example

curl -X POST "https://api.parsefy.io/v1/extract" \
  -H "Authorization: Bearer pk_your_api_key" \
  -F "[email protected]" \
  -F 'output_schema={...}'