Amux AI

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.

POSThttps://gateway.amux.ai/v1/tools/fetch

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key created in the console.

Content-TypestringRequiredDefault "application/json"

Must be application/json.

Request

application/json
modelstringRequired

Fetch model canonical ID or alias (for example jina/jina-fetch or jina-fetch).

urlstringRequired

Target page URL (http:// or https:// only; embedded credentials are rejected).

enginestring

Optional fetch engine (such as Jina direct, browser, cf-browser-rendering, readerlm-v2).

respond_withstring

Optional output mode (such as markdown, html, text, screenshot, readerlm-v2, jina-ocr-v1).

token_budgetinteger

Optional maximum output token budget.

target_selectorstring

Optional CSS selector to extract only matching elements.

wait_for_selectorstring

Optional CSS selector to wait for before extraction.

remove_selectorstring

Optional CSS selector for elements to strip before extraction.

no_cachebooleanDefault false

Whether to bypass upstream cache for a fresh fetch.

Response

200response

Web page fetched successfully.

400response

Invalid request body/URL, or model does not support fetch.

402response

Insufficient workspace balance.

Protocol overview

  • URL validation: Accepts only valid http:// and https:// 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: true is rejected with 400; 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
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
  }
}