Web Fetch
Last updated November 22, 2026
Unified web page fetch and extraction endpoint converting target URLs into clean LLM-ready Markdown.
Unified synchronous web fetch and content extraction endpoint routing by model (currently supporting Jina Fetch and DeepSeek Fetch) and returning cleaned Markdown, metadata, and token usage.
https://gateway.amux.ai/v1/tools/fetchAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> Amux AI API key created in the console.
Content-TypestringRequiredDefault "application/json"Must be application/json.
Request
application/jsonmodelstringRequiredFetch model canonical ID or alias (for example jina/jina-fetch or jina-fetch).
urlstringRequiredTarget page URL (http:// or https:// only; embedded credentials are rejected).
enginestringOptional fetch engine (such as Jina direct, browser, cf-browser-rendering, readerlm-v2).
respond_withstringOptional output mode (such as markdown, html, text, screenshot, readerlm-v2, jina-ocr-v1).
token_budgetintegerOptional maximum output token budget.
target_selectorstringOptional CSS selector to extract only matching elements.
wait_for_selectorstringOptional CSS selector to wait for before extraction.
remove_selectorstringOptional CSS selector for elements to strip before extraction.
no_cachebooleanDefault falseWhether to bypass upstream cache for a fresh fetch.
Response
200responseWeb page fetched successfully.
400responseInvalid request body/URL, or model does not support fetch.
402responseInsufficient workspace balance.
Protocol overview
- URL validation: Accepts only valid
http://andhttps://URLs and rejects embedded credentials (user:pass@host). - Allowlisted extraction controls: Control fetch engines (
engine), output modes (respond_with), CSS selectors, and cache bypass via structured JSON fields translated safely by the gateway. - Synchronous, non-streaming:
stream: trueis rejected with400; response payloads are capped at 24 MB.
Error handling
Errors follow the standard OpenAI error schema. Invalid URLs or unsupported models return 400 invalid_request. See Errors and retries.
curl https://gateway.amux.ai/v1/tools/fetch \
-H "Authorization: Bearer $AMUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jina/jina-fetch",
"url": "https://example.com"
}'{
"object": "page",
"model": "jina/jina-fetch",
"url": "https://example.com/",
"title": "Example Domain",
"description": "<string>",
"content": "# Example Domain",
"usage": {
"total_tokens": 341,
"measured_tokens": 341,
"scaled_tokens": 341
}
}