Example / Qwen3-VL 8B
Describe a product photo as JSON.
Prepare an image-to-JSON request and check whether the model returned parsed data or a text fallback.
Prepare now. Run with beta access.
The code and setup are available now. Request an API key before submitting work to the private beta.
1. Get your account ready.
Request beta access, then follow the API key guide. Add a prepaid usage balance before uploading files. Set YPAD_KEY in your local environment; keep the key out of source files, shared notebooks, and browser storage.
2. Upload a file and keep its ID.
Follow the upload steps to declare the exact content type and byte count, then PUT the file to its signed upload URL. The batch accepts the returned file ID.
Download the guide’s sample input ↓. This is an AI-generated photograph of a fictional, unbranded mug. The guide labels its handwritten JSON illustration separately from model output.
3. Download and edit the dry-run template.
Replace YOUR_UPLOADED_FILE_ID. The template is a dry run; it does not submit a paid job. The sample is below 1 MP and bills at the one-image floor. Larger inputs bill pro rata up to 4 MP; set max_units to cover the decoded input dimensions.
{
"model": "qwen3-vl-8b",
"items": [
{
"file": "YOUR_UPLOADED_FILE_ID",
"params": {
"prompt": "Describe the visible product as JSON with keys object, color, handle_visible, and brand. Use null for attributes that are not visible. Do not invent a brand or material.",
"output": "json"
},
"max_units": 1
}
],
"dry_run": true
}
# Save the template as batch.json and replace YOUR_UPLOADED_FILE_ID.
curl --fail-with-body "https://www.y-pad.com/v1/batches" -H "Authorization: Bearer $YPAD_KEY" -H "Content-Type: application/json" --data @batch.json
4. Review, then submit.
Inspect held_micros and missing-file results. When you are ready to pay for processing, remove dry_run, send the same body with an Idempotency-Key, and follow the polling and download steps. Keep the same key and body when retrying a submission.
Keep the originals and your results.
Review important edges, text, and timing before publishing. Model output can contain mistakes or estimated detail. Save your downloads locally: Deletion starts at 7 days and normally finishes within a further day.