Quickstart

Get your first OCR API call working in under 5 minutes.

Step 1: Get Your API Key

  1. Sign up at pictotext.io
  2. Go to Dashboard → API Keys
  3. Click Generate New Key
  4. Copy your key (starts with sk-)

Step 2: Make Your First Request

Send your first request

Pick your preferred stack below and run the sample request. Replace YOUR_API_KEY with the key you generated in step 1.

Step 3: Understand the Response

Success response (200):

{
  "name": "张三",
  "gender": "男",
  "ethnicity": "汉",
  "dateOfBirth": "1990-01-01",
  "address": "北京市朝阳区",
  "idNumber": "110101199001011234"
}

That's It!

You've successfully extracted data from an ID card.

Next Steps

Common Issues

401 Unauthorized: Check your API key format - should be Bearer YOUR_API_KEY

400 Invalid Document Type: Use a valid type like cn_id_card, not auto

Image Upload Failed: Ensure your image is JPG, PNG, WEBP, HEIC or HEIF format

Need help? Contact [email protected]

Code Examples

Send your first request
curl -X POST "https://pictotext.io/api/v1/ocr" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "documentType=cn_id_card"