Upload and parse a file
Upload and parse a file
- Price
- 0.005000 USDT / request
- Status
- Available
- Official reference
- 0.005000 USDT / request
- Protocols
- REST · MCP
Run a test
Runs are submitted only when you click Run. Check the input and cost limit first.
Starting price shown. Get a quote for your current inputs; settlement uses actual consumption and refunds the difference.
Tests use your account balance and the selected key’s budget. The cost limit caps this API call; it does not include future calls or recurring upstream jobs.
Run a test to see its status, charges and response here.
API reference
A successful asynchronous create call returns a receipt. Use the provider’s status/result operation with that receipt ID to check whether the upstream job has completed.
curl https://gw.asale.ai/v1/tool-runs \
-H 'Authorization: Bearer <ASALE_API_KEY>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: <UNIQUE_REQUEST_ID>' \
-d '{
"tool": "parse",
"input": {
"body": {
"file": {
"content_base64": "",
"filename": ""
}
}
},
"max_cost_micros": 5000
}'curl https://gw.asale.ai/v1/tool-runs/<RUN_ID> -H 'Authorization: Bearer <ASALE_API_KEY>'| Parameter | Required | Type |
|---|---|---|
| body | Yes | object |
Full input schema
{
"$defs": {
"AuditMetadata": {
"additionalProperties": false,
"description": "User attribution included with SIEM logging events when SIEM Logging is enabled for the organization.",
"properties": {
"username": {
"description": "The username associated with the request.",
"maxLength": 1024,
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
},
"ParseFormats": {
"default": [
"markdown"
],
"description": "Output formats supported for `/parse` uploads. Browser-rendering formats and change tracking are not supported.",
"items": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"markdown"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "Markdown",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"summary"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "Summary",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"html"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "HTML",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"rawHtml"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "Raw HTML",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"links"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "Links",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"images"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "Images",
"type": "object"
},
{
"properties": {
"prompt": {
"description": "The prompt to use for the JSON output",
"type": "string"
},
"schema": {
"description": "The schema to use for the JSON output. Must conform to [JSON Schema](https://json-schema.org/).",
"type": "object"
},
"type": {
"enum": [
"json"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "JSON",
"type": "object"
}
]
},
"type": "array"
},
"ParseOptions": {
"description": "Optional parse options sent as JSON in the multipart `options` field.",
"properties": {
"auditMetadata": {
"$ref": "#/$defs/AuditMetadata"
},
"blockAds": {
"default": true,
"description": "Enable ad and cookie popup blocking.",
"type": "boolean"
},
"excludeTags": {
"description": "Tags to exclude from the output.",
"items": {
"type": "string"
},
"type": "array"
},
"formats": {
"$ref": "#/$defs/ParseFormats"
},
"headers": {
"description": "Headers to send when additional network requests are required.",
"type": "object"
},
"includeTags": {
"description": "Tags to include in the output.",
"items": {
"type": "string"
},
"type": "array"
},
"integration": {
"anyOf": [
{
"description": "Optional integration identifier.",
"type": "string"
},
{
"type": "null"
}
]
},
"onlyMainContent": {
"default": true,
"description": "Only return the main content of the page excluding headers, navs, footers, etc.",
"type": "boolean"
},
"origin": {
"default": "api",
"description": "Origin identifier for analytics and logging.",
"type": "string"
},
"parsers": {
"default": [
"pdf"
],
"description": "Controls file parser behavior when relevant (for example PDF parser mode).",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"blocks": {
"default": false,
"description": "Include per-page typed layout blocks alongside the document markdown. Populates the `blocks` field on the document: typed blocks (title, section_header, text, table, formula, figure, caption, ...) with normalized bounding boxes, reading order, character-span links into the markdown, and per-block confidence. No additional cost.",
"type": "boolean"
},
"maxPages": {
"description": "Maximum number of pages to parse from the PDF.",
"maximum": 10000,
"minimum": 1,
"type": "integer"
},
"mode": {
"default": "auto",
"description": "PDF parsing mode. \"fast\": text-only extraction. \"auto\": text-first with OCR fallback. \"ocr\": OCR on every page.",
"enum": [
"fast",
"auto",
"ocr"
],
"type": "string"
},
"pageMarkers": {
"default": false,
"description": "Annotate page breaks in the document markdown: pages are joined with `\\n\\n---\\n\\n\\n\\n`, where N is the 1-based physical page of the content that follows. Markers appear between pages only (no leading marker for page 1), and numbering may skip pages merged across a page break — use `pages: true` when every physical page is needed. No new response field; no additional cost.",
"type": "boolean"
},
"pages": {
"default": false,
"description": "Include physical per-page markdown alongside the document markdown. Populates the `pages` field on the document as an array of { pageNumber, markdown }. No additional cost.",
"type": "boolean"
},
"type": {
"enum": [
"pdf"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
]
},
"type": "array"
},
"proxy": {
"description": "Proxy mode for parse uploads. `/parse` supports only `basic` and `auto`.",
"enum": [
"basic",
"auto"
],
"type": "string"
},
"redactPII": {
"default": false,
"description": "Redact personally identifiable information from returned markdown. Pass `true` to use defaults, or an object to tune mode, entities, and replacement style.",
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "#/$defs/RedactPIIOptions"
}
]
},
"removeBase64Images": {
"default": true,
"description": "Remove base64-encoded images from output and keep alt text placeholders.",
"type": "boolean"
},
"skipTlsVerification": {
"default": true,
"description": "Skip TLS certificate verification when making requests.",
"type": "boolean"
},
"timeout": {
"default": 30000,
"description": "Timeout in milliseconds for the request. Default is 30000 (30 seconds). Maximum is 300000 (300 seconds).",
"maximum": 300000,
"type": "integer"
},
"zeroDataRetention": {
"default": false,
"description": "If true, this will enable zero data retention for this parse. To enable this feature, please contact help@Asale.dev",
"type": "boolean"
}
},
"type": "object"
},
"RedactPIIEntity": {
"description": "Public PII entity buckets supported by Asale redaction.",
"enum": [
"PERSON",
"EMAIL",
"PHONE",
"LOCATION",
"FINANCIAL",
"SECRET"
],
"type": "string"
},
"RedactPIIOptions": {
"additionalProperties": false,
"description": "Tuning options for PII redaction.",
"properties": {
"entities": {
"description": "Restrict redaction to these entity buckets. If omitted, all supported entities are redacted.",
"items": {
"$ref": "#/$defs/RedactPIIEntity"
},
"type": "array"
},
"mode": {
"default": "accurate",
"description": "Redaction strategy. `accurate` is model-only and optimized for precision, `aggressive` increases recall with additional heuristics, and `fast` uses heuristics without the model call.",
"enum": [
"accurate",
"aggressive",
"fast"
],
"type": "string"
},
"replaceStyle": {
"default": "tag",
"description": "`tag` replaces spans with placeholders like ``, `mask` replaces characters with `*`, and `remove` deletes the span text.",
"enum": [
"tag",
"mask",
"remove"
],
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"file": {
"additionalProperties": false,
"properties": {
"content_base64": {
"maxLength": 1400000,
"type": "string"
},
"content_type": {
"type": "string"
},
"filename": {
"minLength": 1,
"type": "string"
}
},
"required": [
"filename",
"content_base64"
],
"type": "object"
},
"options": {
"$ref": "#/$defs/ParseOptions"
}
},
"required": [
"file"
],
"type": "object"
}
},
"required": [
"body"
],
"type": "object"
}Price
0.005000 USDT / request
Starting price shown. Get a quote for your current inputs; settlement uses actual consumption and refunds the difference.
Tests use your account balance and the selected key’s budget. The cost limit caps this API call; it does not include future calls or recurring upstream jobs.
Price revision 5
Web content
Asale matches available channels by price. The reference is the highest verified channel reference price. Only definite rejections may transfer to another channel; uncertain executions require reconciliation to avoid duplicate charges.
Supply channels: 1