Choose a permitted source
Use an owned, public or otherwise authorized file. Do not place credentials, restricted records or unnecessary personal data in a tutorial request.
This tutorial shows the DocuStruct contract for a bounded document-automation task: send one permitted PDF or image, request a compact JSON shape, inspect the result, then let your operating team decide what happens next.
A developer integrating invoices, delivery notes or technical documents usually needs a few reviewable fields rather than a broad document summary. The request schema makes that boundary explicit and keeps unknown values visible.
Use an owned, public or otherwise authorized file. Do not place credentials, restricted records or unnecessary personal data in a tutorial request.
For example, ask for vendor and total. A narrow schema makes missing or ambiguous fields easier to review.
Completed JSON is structured output, not approval to update a system of record or trigger an operational action.
Replace the placeholders with your RapidAPI host, key and a base64-encoded authorized fixture. Keep the same Idempotency-Key when retrying the same document request.
curl --request POST \
--url https://YOUR_RAPIDAPI_HOST/api/v1/docustruct/extract \
--header 'x-rapidapi-key: YOUR_KEY' \
--header 'x-rapidapi-host: YOUR_RAPIDAPI_HOST' \
--header 'Idempotency-Key: tutorial-example-001' \
--header 'Content-Type: application/json' \
--data '{
"filename":"example-invoice.png",
"mimeType":"image/png",
"base64":"BASE64_ENCODED_AUTHORIZED_FILE",
"schema":"{\"vendor\":\"string\",\"total\":\"number\"}"
}'The response below is an illustrative shape, not a customer document or accuracy claim. Your workflow should preserve missing values, validation issues and source context for the person responsible for the next decision.
{
"id": "ds_example",
"status": "completed",
"pageCount": 1,
"result": {
"vendor": "Example Vendor",
"total": 149.5
}
}Confirm that required fields are present, the document was authorized, values make sense for your process and exceptions remain visible. Then decide whether to approve, correct or hold the record.
Confirm the requestor may process the document and minimize the uploaded data before sending it.
Reuse the key for the same logical request so a retry does not create a second job.
Inspect status, page count, requested fields and missing values before downstream routing.
Keep a manual path for unreadable sources, unexpected values and business approvals.
Unsupported MIME types, files over 10 MB and PDFs over 25 pages should be handled by the calling workflow before the request.
Ask only for fields you can review. The API returns a structured extraction rather than a business approval or downstream write.
Do not use the public tutorial fixture or demo to upload confidential, regulated or unrelated personal documents.