/ai/document/extract/read/urlExtracts read data from a document at the provided URL and returns parsing output in a JSON object. You can request either the `apyhub` or `azure` service output through the request body.
Extract read data (URL input)
**Method:** POST
**Apiosk URL:** https://gateway.apiosk.com/apyhub-ai-document-extract-read/ai/document/extract/read/url
**Request content type:** application/json
**Response content type:** application/json
What it does
Extracts read data from a document at the provided URL and returns parsing output in a JSON object. You can request either the apyhub or azure service output through the request body.
Request Body
| Parameter | Type | Mandatory | Description |
| --------- | ------ | --------- | ---------------------------------------------- |
| url | String | Yes | Document URL to process. Must be a valid URI. |
| azure | Object | No | Custom credentials for Azure services. See schema for nested fields. |
| azure.key | String | Yes (if azure is selected in requested_service)| Azure subscription key. |
| azure.region | String | No | Azure service region. |
| azure.endpoint | String | Yes (if azure is selected in requested_service) | Azure endpoint URL. |
| azure.account_id | String | Yes (if azure is selected in requested_service) | Azure account ID. |
| azure.access_token | String | No | OAuth access token for Azure service. |
| requested_service | ENUM | No | Service to use for extraction. Allowed values: azure, apyhub. Default: apyhub. |
Response
Returns a JSON object with a data object field. Inside data, the response may include an azure object for raw Azure Document Intelligence parsing output and/or an apyhub object for structured ApyHub Read Layout Transcription parsing output.
| Parameter | Type | Mandatory | Description |
| --------- | ------ | --------- | ---------------------------------------------- |
| data | Object | No | Response payload containing service-specific parsing output. |
| data.azure | Object | No | Raw Azure Document Intelligence parsing output. |
| data.apyhub | Object | No | Structured ApyHub Read Layout Transcription parsing output. |
Quickstart
Send a PDF URL for parsing and let ApyHub return extracted read data.
bash
curl -X POST "https://gateway.apiosk.com/apyhub-ai-document-extract-read/ai/document/extract/read/url" \
-H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"url":"https://assets.apyhub.com/samples/sample.docx","requested_service":"apyhub"}'
What you'll get back
Returns a JSON object with a data object field. The data object may contain an apyhub object with structured ApyHub Read Layout Transcription parsing output, and/or an azure object with raw Azure Document Intelligence parsing output.
json
{
"data": {
"apyhub": {},
"azure": {}
}
}
Payment and authentication
Do not send an apy-token. Apiosk injects the APYHub credential server-side. The first unpaid request returns HTTP 402 Payment Required with a PAYMENT-REQUIRED header. Sign an accepted USDC payment and retry the same request with the proof in PAYMENT-SIGNATURE (or use an Apiosk/x402-aware agent client that performs this exchange automatically).
The $PAYMENT_SIGNATURE placeholder in the example is the signed proof obtained from that initial 402 response.
Source
Parameter definitions and limits were synchronized from [APYHub's official documentation](https://apyhub.com/apyhub/service/extract-read-data) on 2026-07-18.
Pay per request through Apiosk using x402. Do not send an apy-token; the gateway injects the selected APYHub key server-side.
{
"properties": {
"azure": {
"description": "Custom credentials for Azure services.",
"properties": {
"access_token": {
"description": "OAuth access token for Azure service.",
"example": "access_token_value",
"type": "string"
},
"account_id": {
"description": "Azure account ID.",
"example": "account-id-1234",
"type": "string"
},
"endpoint": {
"description": "Azure endpoint URL.",
"example": "https://westus2.api.cognitive.microsoft.com/",
"type": "string"
},
"key": {
"description": "Azure subscription key.",
"example": "your_azure_speech_or_vision_key",
"type": "string"
},
"region": {
"description": "Azure service region.",
"example": "westus2",
"type": "string"
}
},
"type": "object"
},
"requested_service": {
"default": "apyhub",
"enum": [
"azure",
"apyhub"
],
"example": "apyhub",
"type": "string"
},
"url": {
"example": "https://example.com/read.pdf",
"format": "uri",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}{
"properties": {
"data": {
"properties": {
"apyhub": {
"description": "Structured ApyHub Read Layout Transcription parsing output.",
"type": "object"
},
"azure": {
"description": "Raw Azure Document Intelligence parsing output.",
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}{
"properties": {
"PAYMENT-SIGNATURE": {
"description": "Signed x402 v2 payment proof. Obtain the payment requirements from the initial HTTP 402 response.",
"type": "string"
}
},
"required": [],
"type": "object"
}{
"requested_service": "apyhub",
"url": "https://example.com/read.pdf"
}{
"data": {
"apyhub": {},
"azure": {}
}
}