This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
To authenticate requests, include a X-Api-Key header with the value "shub_...".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Retrieve your API key from the SaaS Management > Applications section in the Admin Dashboard.
Process an image or PDF to extract structured information using AI providers.
curl --request POST \
"https://serviceshub.dev/api/v1/vision/extract" \
--header "X-Api-Key: Tu llave API (shub_...)" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "method_id=1"\
--form "dpi=300"\
--form "schema[amount]=Total amount paid"\
--form "schema_id=1"\
--form "return_raw_text="\
--form "return_structured_data=1"\
--form "quality_profile=high"\
--form "file=@/private/var/folders/13/zkzb22yj45zchbybxv89q4l00000gn/T/phpuf3gm1jihbac9obhoaf" {
"ok": true,
"data": {
"amount": "1,500.00",
"currency": "MXN",
"date": "2026-03-26"
}
}
curl --request POST \
"https://serviceshub.dev/api/v1/vision/requests/architecto/feedback" \
--header "X-Api-Key: shub_..." \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"accepted\": true,
\"reason_code\": \"b\",
\"reason_note\": \"n\",
\"retry\": true
}"