{
 "description": "Agent Exchange Media: keyless pay-per-call AI media and inference on Cloudflare Workers AI. 13 POST routes paid per call in USDC on Base with x402: text-to-image $0.02, caption $0.005, speech $0.01, transcription $0.01, translation $0.002, summary $0.002, embeddings $0.001, chat $0.005 (70B $0.02), classification $0.001, OCR $0.005, language detection $0.001, a $1.00 batch of 100 cheap operations and a $5.00 set of 20 images. Every model id is a public Workers AI id and is named in each response.",
 "instructions": "POST JSON to any resource; unpaid GET, HEAD and POST answer HTTP 402 with x402 requirements (scheme exact, network eip155:8453, USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, payTo 0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c). Sign the EIP-3009 authorization for the amount and retry with X-PAYMENT (v1) or PAYMENT-SIGNATURE (v2); the response carries PAYMENT-RESPONSE. No API keys, no signup. A model failure after settlement answers 502 and the same X-PAYMENT is honoured once more within 10 minutes. Free: GET /samples/<route>.json, /openapi.json, /llms.txt, /live.json, /health; MCP at POST /mcp.",
 "count": 14,
 "resources": [
  {
   "resource": "https://media.agentexchange.work/image",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.02,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "20000",
     "resource": "https://media.agentexchange.work/image",
     "description": "Text-to-image on Workers AI: FLUX.1 [schnell], 1024x1024 JPEG, 1-8 steps (fallback Stable Diffusion XL base, PNG). Call it when an agent needs one picture from a text prompt in a few seconds. Body {prompt (<=1,000 chars), steps? (1-8, default 4), seed?}; returns {image_base64, mime, model, seed, steps, took_ms}; add ?format=binary for the image bytes. $0.02 USDC per image.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "prompt": "a lighthouse on a basalt cliff at dawn, thick fog, film grain",
        "steps": 4,
        "seed": 7
       }
      },
      "output": {
       "type": "json",
       "example": {
        "image_base64": "/9j/4AAQSkZJRg...(JPEG, base64)",
        "mime": "image/jpeg",
        "model": "@cf/black-forest-labs/flux-1-schnell",
        "fallback": false,
        "seed": 7,
        "steps": 4,
        "took_ms": 2900
       }
      }
     }
    }
   ],
   "name": "Text to image (FLUX schnell)",
   "description": "Text-to-image on Workers AI: FLUX.1 [schnell], 1024x1024 JPEG, 1-8 steps (fallback Stable Diffusion XL base, PNG). Call it when an agent needs one picture from a text prompt in a few seconds. Body {prompt (<=1,000 chars), steps? (1-8, default 4), seed?}; returns {image_base64, mime, model, seed, steps, took_ms}; add ?format=binary for the image bytes. $0.02 USDC per image.",
   "tags": [
    "image",
    "text-to-image",
    "flux",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/caption",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.005,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "5000",
     "resource": "https://media.agentexchange.work/caption",
     "description": "Image to caption: LLaVA 1.5 7B (fallback Llama 3.2 11B Vision) describes the picture in one or two sentences. Use it to label, alt-text or index images. Body {image_url (https, <=5 MB, fetched within 8 s)} or {image_base64}, optional prompt (<=500 chars); or POST the raw image bytes with an image/* content type. Returns {caption, model, took_ms}. $0.005 USDC per image.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "image_url": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg"
       }
      },
      "output": {
       "type": "json",
       "example": {
        "caption": "A tabby cat sits on a wooden floor looking directly at the camera.",
        "model": "@cf/llava-hf/llava-1.5-7b-hf",
        "fallback": false,
        "image_bytes": 154229,
        "source": "url",
        "took_ms": 1800
       }
      }
     }
    }
   ],
   "name": "Image caption (LLaVA 1.5)",
   "description": "Image to caption: LLaVA 1.5 7B (fallback Llama 3.2 11B Vision) describes the picture in one or two sentences. Use it to label, alt-text or index images. Body {image_url (https, <=5 MB, fetched within 8 s)} or {image_base64}, optional prompt (<=500 chars); or POST the raw image bytes with an image/* content type. Returns {caption, model, took_ms}. $0.005 USDC per image.",
   "tags": [
    "image",
    "caption",
    "vision",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/speech",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.01,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "10000",
     "resource": "https://media.agentexchange.work/speech",
     "description": "Text to speech: MeloTTS returns MP3 audio for up to 2,000 characters (lang en, es, fr, zh, ja, ko; fallback Deepgram Aura-1, English, for texts under 600 characters). Body {text, lang?}; the response is audio/mpeg bytes with X-Model and X-Chars headers, or JSON {audio_base64, mime, model} with ?format=json. $0.01 USDC per call.",
     "mimeType": "audio/mpeg",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "text": "Your order has shipped and will arrive on Thursday.",
        "lang": "en"
       }
      },
      "output": {
       "type": "json",
       "example": {
        "audio_base64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4...(MP3, base64)",
        "mime": "audio/mpeg",
        "model": "@cf/myshell-ai/melotts",
        "fallback": false,
        "lang": "en",
        "chars": 52,
        "took_ms": 900
       }
      }
     }
    }
   ],
   "name": "Text to speech (MeloTTS)",
   "description": "Text to speech: MeloTTS returns MP3 audio for up to 2,000 characters (lang en, es, fr, zh, ja, ko; fallback Deepgram Aura-1, English, for texts under 600 characters). Body {text, lang?}; the response is audio/mpeg bytes with X-Model and X-Chars headers, or JSON {audio_base64, mime, model} with ?format=json. $0.01 USDC per call.",
   "tags": [
    "audio",
    "tts",
    "speech",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/transcribe",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.01,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "10000",
     "resource": "https://media.agentexchange.work/transcribe",
     "description": "Speech to text: Whisper large-v3-turbo (fallback Whisper for files <= 3 MB) transcribes audio up to 10 MB in any common format. Body {audio_url (https, <=10 MB)} or {audio_base64 (<=4.5 MB raw because of the 6 MB body cap)} or raw audio/* bytes; optional language (ISO 639-1). Returns {text, language, duration_s, word_count, segments, vtt, model}. $0.01 USDC per file.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "audio_url": "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg",
        "language": "en"
       }
      },
      "output": {
       "type": "json",
       "example": {
        "text": "The examples are short recordings used to test audio playback.",
        "language": "en",
        "duration_s": 6.1,
        "word_count": 11,
        "segments": [
         {
          "start": 0,
          "end": 6.1,
          "text": "The examples are short recordings used to test audio playback."
         }
        ],
        "vtt": "WEBVTT\n\n00:00.000 --> 00:06.100\nThe examples are short recordings used to test audio playback.",
        "model": "@cf/openai/whisper-large-v3-turbo",
        "fallback": false,
        "took_ms": 2100
       }
      }
     }
    }
   ],
   "name": "Speech to text (Whisper v3)",
   "description": "Speech to text: Whisper large-v3-turbo (fallback Whisper for files <= 3 MB) transcribes audio up to 10 MB in any common format. Body {audio_url (https, <=10 MB)} or {audio_base64 (<=4.5 MB raw because of the 6 MB body cap)} or raw audio/* bytes; optional language (ISO 639-1). Returns {text, language, duration_s, word_count, segments, vtt, model}. $0.01 USDC per file.",
   "tags": [
    "audio",
    "transcription",
    "whisper",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/translate",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.002,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "2000",
     "resource": "https://media.agentexchange.work/translate",
     "description": "Translation: Meta M2M100 1.2B between 100 languages (fallback Llama 3.1 8B with a translation prompt). Body {text (<=5,000 chars), source_lang? (ISO 639-1, default en), target_lang (ISO 639-1)}. Returns {translation, source_lang, target_lang, model}. $0.002 USDC per call.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "text": "The invoice is due in thirty days.",
        "source_lang": "en",
        "target_lang": "es"
       }
      },
      "output": {
       "type": "json",
       "example": {
        "translation": "La factura vence en treinta días.",
        "source_lang": "en",
        "target_lang": "es",
        "model": "@cf/meta/m2m100-1.2b",
        "fallback": false,
        "took_ms": 400
       }
      }
     }
    }
   ],
   "name": "Translate (M2M100 1.2B)",
   "description": "Translation: Meta M2M100 1.2B between 100 languages (fallback Llama 3.1 8B with a translation prompt). Body {text (<=5,000 chars), source_lang? (ISO 639-1, default en), target_lang (ISO 639-1)}. Returns {translation, source_lang, target_lang, model}. $0.002 USDC per call.",
   "tags": [
    "text",
    "translation",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/summarize",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.002,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "2000",
     "resource": "https://media.agentexchange.work/summarize",
     "description": "Summarization: Llama 3.1 8B instruct (fp8) with a summarization prompt; BART-large-CNN is no longer in the Workers AI catalog. Body {text (<=20,000 chars), max_words? (20-400, default 120)}. Returns {summary, max_words, input_chars, model}. $0.002 USDC per call.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "text": "Cloudflare Workers AI runs machine learning models on Cloudflare's global network... (up to 20,000 characters)",
        "max_words": 60
       }
      },
      "output": {
       "type": "json",
       "example": {
        "summary": "Workers AI runs machine-learning models on Cloudflare's network, billed per use, with a free daily allowance.",
        "max_words": 60,
        "input_chars": 1840,
        "model": "@cf/meta/llama-3.1-8b-instruct-fp8",
        "fallback": false,
        "usage": {
         "prompt_tokens": 470,
         "completion_tokens": 26,
         "total_tokens": 496
        },
        "took_ms": 1300
       }
      }
     }
    }
   ],
   "name": "Summarize (Llama 3.1 8B)",
   "description": "Summarization: Llama 3.1 8B instruct (fp8) with a summarization prompt; BART-large-CNN is no longer in the Workers AI catalog. Body {text (<=20,000 chars), max_words? (20-400, default 120)}. Returns {summary, max_words, input_chars, model}. $0.002 USDC per call.",
   "tags": [
    "text",
    "summary",
    "llm",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/embed",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.001,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "1000",
     "resource": "https://media.agentexchange.work/embed",
     "description": "Text embeddings: BAAI bge-m3, 1024 dimensions, multilingual, up to 32 texts of 2,000 characters per call (fallback bge-base-en-v1.5, 768 dims, English). Body {texts: [...]}. Returns {vectors, dims, count, model}. $0.001 USDC per call, not per text.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "texts": [
         "pay-per-call image generation",
         "USDC settlement on Base"
        ]
       }
      },
      "output": {
       "type": "json",
       "example": {
        "vectors": [
         [
          0.0123,
          -0.0456,
          "...1024 numbers"
         ],
         [
          0.0311,
          0.0021,
          "..."
         ]
        ],
        "dims": 1024,
        "count": 2,
        "model": "@cf/baai/bge-m3",
        "fallback": false,
        "took_ms": 120
       }
      }
     }
    }
   ],
   "name": "Embeddings (BGE-M3)",
   "description": "Text embeddings: BAAI bge-m3, 1024 dimensions, multilingual, up to 32 texts of 2,000 characters per call (fallback bge-base-en-v1.5, 768 dims, English). Body {texts: [...]}. Returns {vectors, dims, count, model}. $0.001 USDC per call, not per text.",
   "tags": [
    "text",
    "embeddings",
    "vectors",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/chat",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.005,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "5000",
     "resource": "https://media.agentexchange.work/chat",
     "description": "OpenAI-style chat completion: Llama 3.1 8B instruct fp8 at $0.005 (model \"llama-3.1-8b\", default) or Llama 3.3 70B instruct fp8-fast at $0.02 (model \"llama-3.3-70b\" in the body or ?model=llama-3.3-70b; the 402 then asks for 20000). Body {messages (<=20, <=12,000 chars total), model?, max_tokens? (<=1024, default 256), temperature? (0-2)}. Returns {choices:[{message}], usage, model} and no stream.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "model": "llama-3.1-8b",
        "messages": [
         {
          "role": "user",
          "content": "Give me three names for a lighthouse-keeping robot."
         }
        ],
        "max_tokens": 120
       }
      },
      "output": {
       "type": "json",
       "example": {
        "id": "chatcmpl-8f1c...",
        "object": "chat.completion",
        "created": 1790000000,
        "model": "@cf/meta/llama-3.1-8b-instruct-fp8",
        "choices": [
         {
          "index": 0,
          "message": {
           "role": "assistant",
           "content": "Beacon, Fresnel, and Keeper-9."
          },
          "finish_reason": "stop"
         }
        ],
        "usage": {
         "prompt_tokens": 21,
         "completion_tokens": 12,
         "total_tokens": 33
        },
        "took_ms": 700
       }
      }
     }
    }
   ],
   "name": "Chat completions (Llama 3.1)",
   "description": "OpenAI-style chat completion: Llama 3.1 8B instruct fp8 at $0.005 (model \"llama-3.1-8b\", default) or Llama 3.3 70B instruct fp8-fast at $0.02 (model \"llama-3.3-70b\" in the body or ?model=llama-3.3-70b; the 402 then asks for 20000). Body {messages (<=20, <=12,000 chars total), model?, max_tokens? (<=1024, default 256), temperature? (0-2)}. Returns {choices:[{message}], usage, model} and no stream.",
   "tags": [
    "llm",
    "chat",
    "openai-compatible",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/classify",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.001,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "1000",
     "resource": "https://media.agentexchange.work/classify",
     "description": "Text classification: sentiment (POSITIVE/NEGATIVE with scores) from DistilBERT SST-2, or zero-shot into your own labels (2-10) with Llama 3.1 8B when {labels} is sent. Body {text (<=5,000 chars; <=2,000 for zero-shot), labels?}. Returns {label, scores|confidence, method, model}. $0.001 USDC per call.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "text": "The checkout kept timing out and support never answered."
       }
      },
      "output": {
       "type": "json",
       "example": {
        "label": "NEGATIVE",
        "scores": {
         "POSITIVE": 0.0009,
         "NEGATIVE": 0.9991
        },
        "method": "SST-2 sentiment (POSITIVE/NEGATIVE)",
        "model": "@cf/huggingface/distilbert-sst-2-int8",
        "took_ms": 60
       }
      }
     }
    }
   ],
   "name": "Classify text (DistilBERT)",
   "description": "Text classification: sentiment (POSITIVE/NEGATIVE with scores) from DistilBERT SST-2, or zero-shot into your own labels (2-10) with Llama 3.1 8B when {labels} is sent. Body {text (<=5,000 chars; <=2,000 for zero-shot), labels?}. Returns {label, scores|confidence, method, model}. $0.001 USDC per call.",
   "tags": [
    "text",
    "classification",
    "sentiment",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/ocr",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.005,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "5000",
     "resource": "https://media.agentexchange.work/ocr",
     "description": "Image to text: LLaVA 1.5 7B (fallback Llama 3.2 11B Vision) reads the text visible in an image. It is a vision-language model, not a dedicated OCR engine, so expect mistakes on dense pages or tiny print; good for signs, labels, screenshots and short documents. Body {image_url (<=5 MB)} or {image_base64} or raw image/* bytes. Returns {text, method, model}. $0.005 USDC per image.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "image_url": "https://upload.wikimedia.org/wikipedia/commons/2/25/Stop_sign_MUTCD.svg.png"
       }
      },
      "output": {
       "type": "json",
       "example": {
        "text": "STOP",
        "method": "vision-language model reading the image; not a dedicated OCR engine",
        "model": "@cf/llava-hf/llava-1.5-7b-hf",
        "fallback": false,
        "image_bytes": 20411,
        "source": "url",
        "took_ms": 1700
       }
      }
     }
    }
   ],
   "name": "Read text in image (LLaVA)",
   "description": "Image to text: LLaVA 1.5 7B (fallback Llama 3.2 11B Vision) reads the text visible in an image. It is a vision-language model, not a dedicated OCR engine, so expect mistakes on dense pages or tiny print; good for signs, labels, screenshots and short documents. Body {image_url (<=5 MB)} or {image_base64} or raw image/* bytes. Returns {text, method, model}. $0.005 USDC per image.",
   "tags": [
    "image",
    "ocr",
    "vision",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/detect-language",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.001,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "1000",
     "resource": "https://media.agentexchange.work/detect-language",
     "description": "Language detection by a heuristic (Unicode script ranges plus stopword frequencies for 20 Latin-script languages); no model runs, sub-millisecond, reliable from about 20 characters of prose. Body {text (<=20,000 chars)}. Returns {language (ISO 639-1 or 'und'), name, script, confidence, method}. $0.001 USDC per call.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "text": "La factura vence en treinta días y el pago se realiza por transferencia."
       }
      },
      "output": {
       "type": "json",
       "example": {
        "language": "es",
        "name": "Spanish",
        "script": "latin",
        "confidence": 0.86,
        "method": "heuristic: Unicode script ranges and stopword frequencies (20 Latin-script languages); no model",
        "chars": 71,
        "took_ms": 0
       }
      }
     }
    }
   ],
   "name": "Detect language (heuristic)",
   "description": "Language detection by a heuristic (Unicode script ranges plus stopword frequencies for 20 Latin-script languages); no model runs, sub-millisecond, reliable from about 20 characters of prose. Body {text (<=20,000 chars)}. Returns {language (ISO 639-1 or 'und'), name, script, confidence, method}. $0.001 USDC per call.",
   "tags": [
    "text",
    "language",
    "detection",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/batch",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 1,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "1000000",
     "resource": "https://media.agentexchange.work/batch",
     "description": "One request, up to 100 items across embed, translate, summarize and classify with the same limits as the single routes (total text <= 500,000 characters); items run 4 at a time and each returns its own result or error. Body {items: [{op: 'embed'|'translate'|'summarize'|'classify', ...fields of that route}]}. Returns {results, count, ok_count}. $1.00 USDC per batch whatever the item count; a batch whose items all fail can be replayed free within 10 minutes.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "items": [
         {
          "op": "translate",
          "text": "Where is the station?",
          "target_lang": "de"
         },
         {
          "op": "classify",
          "text": "Loved it, fast and simple."
         },
         {
          "op": "embed",
          "texts": [
           "one",
           "two"
          ]
         }
        ]
       }
      },
      "output": {
       "type": "json",
       "example": {
        "count": 3,
        "ok_count": 3,
        "failed_count": 0,
        "results": [
         {
          "index": 0,
          "op": "translate",
          "ok": true,
          "result": {
           "translation": "Wo ist der Bahnhof?",
           "source_lang": "en",
           "target_lang": "de",
           "model": "@cf/meta/m2m100-1.2b"
          }
         },
         {
          "index": 1,
          "op": "classify",
          "ok": true,
          "result": {
           "label": "POSITIVE",
           "scores": {
            "POSITIVE": 0.9994,
            "NEGATIVE": 0.0006
           },
           "model": "@cf/huggingface/distilbert-sst-2-int8"
          }
         },
         {
          "index": 2,
          "op": "embed",
          "ok": true,
          "result": {
           "dims": 1024,
           "count": 2,
           "vectors": [
            "..."
           ],
           "model": "@cf/baai/bge-m3"
          }
         }
        ],
        "took_ms": 2600
       }
      }
     }
    }
   ],
   "name": "Batch 100 cheap ops",
   "description": "One request, up to 100 items across embed, translate, summarize and classify with the same limits as the single routes (total text <= 500,000 characters); items run 4 at a time and each returns its own result or error. Body {items: [{op: 'embed'|'translate'|'summarize'|'classify', ...fields of that route}]}. Returns {results, count, ok_count}. $1.00 USDC per batch whatever the item count; a batch whose items all fail can be replayed free within 10 minutes.",
   "tags": [
    "batch",
    "embeddings",
    "translation",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/image-set",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 5,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "5000000",
     "resource": "https://media.agentexchange.work/image-set",
     "description": "Twenty 1024x1024 JPEGs from a list of 1-20 prompts (prompts are cycled to fill 20 slots), FLUX.1 [schnell] at 1-4 steps each: schnell-grade quality, no upscaling, no SDXL fallback, seeds seed+i. Body {prompts: [...] (<=1,000 chars each), steps? (1-4, default 4), seed?}. Returns {images: [{index, prompt_index, seed, image_base64, mime}], ok_count, model}. $5.00 USDC per set; when 10 or more slots fail the call answers 502 and can be replayed free within 10 minutes.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "prompts": [
         "a red lighthouse at dawn, fog",
         "a blue lighthouse at noon, clear sky",
         "a white lighthouse at dusk, storm"
        ],
        "steps": 4,
        "seed": 100
       }
      },
      "output": {
       "type": "json",
       "example": {
        "count": 20,
        "ok_count": 20,
        "failed_count": 0,
        "model": "@cf/black-forest-labs/flux-1-schnell",
        "steps": 4,
        "quality": "schnell-grade: FLUX.1 [schnell], 1024x1024 JPEG, <= 4 steps, no upscaling",
        "images": [
         {
          "index": 0,
          "prompt_index": 0,
          "seed": 100,
          "mime": "image/jpeg",
          "image_base64": "/9j/4AAQ...(JPEG, base64)"
         },
         {
          "index": 1,
          "prompt_index": 1,
          "seed": 101,
          "mime": "image/jpeg",
          "image_base64": "..."
         }
        ],
        "took_ms": 21000
       }
      }
     }
    }
   ],
   "name": "20 images, FLUX schnell",
   "description": "Twenty 1024x1024 JPEGs from a list of 1-20 prompts (prompts are cycled to fill 20 slots), FLUX.1 [schnell] at 1-4 steps each: schnell-grade quality, no upscaling, no SDXL fallback, seeds seed+i. Body {prompts: [...] (<=1,000 chars each), steps? (1-4, default 4), seed?}. Returns {images: [{index, prompt_index, seed, image_base64, mime}], ok_count, model}. $5.00 USDC per set; when 10 or more slots fail the call answers 502 and can be replayed free within 10 minutes.",
   "tags": [
    "image",
    "batch",
    "flux",
    "x402",
    "usdc"
   ]
  },
  {
   "resource": "https://media.agentexchange.work/chat?model=llama-3.3-70b",
   "type": "http",
   "method": "POST",
   "x402Version": 1,
   "price_usd": 0.02,
   "accepts": [
    {
     "scheme": "exact",
     "network": "base",
     "maxAmountRequired": "20000",
     "resource": "https://media.agentexchange.work/chat?model=llama-3.3-70b",
     "description": "OpenAI-style chat completion: Llama 3.1 8B instruct fp8 at $0.005 (model \"llama-3.1-8b\", default) or Llama 3.3 70B instruct fp8-fast at $0.02 (model \"llama-3.3-70b\" in the body or ?model=llama-3.3-70b; the 402 then asks for 20000). Body {messages (<=20, <=12,000 chars total), model?, max_tokens? (<=1024, default 256), temperature? (0-2)}. Returns {choices:[{message}], usage, model} and no stream.",
     "mimeType": "application/json",
     "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
     "maxTimeoutSeconds": 300,
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "method": "POST",
     "networkCaip": "eip155:8453",
     "outputSchema": {
      "input": {
       "type": "http",
       "method": "POST",
       "bodyType": "json",
       "body": {
        "model": "llama-3.3-70b",
        "messages": [
         {
          "role": "user",
          "content": "Give me three names for a lighthouse-keeping robot."
         }
        ],
        "max_tokens": 120
       }
      },
      "output": {
       "type": "json",
       "example": {
        "id": "chatcmpl-8f1c...",
        "object": "chat.completion",
        "created": 1790000000,
        "model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
        "choices": [
         {
          "index": 0,
          "message": {
           "role": "assistant",
           "content": "Beacon, Fresnel, and Keeper-9."
          },
          "finish_reason": "stop"
         }
        ],
        "usage": {
         "prompt_tokens": 21,
         "completion_tokens": 12,
         "total_tokens": 33
        },
        "took_ms": 700
       }
      }
     }
    }
   ],
   "name": "Chat completions (Llama 70B)",
   "description": "OpenAI-style chat completion: Llama 3.1 8B instruct fp8 at $0.005 (model \"llama-3.1-8b\", default) or Llama 3.3 70B instruct fp8-fast at $0.02 (model \"llama-3.3-70b\" in the body or ?model=llama-3.3-70b; the 402 then asks for 20000). Body {messages (<=20, <=12,000 chars total), model?, max_tokens? (<=1024, default 256), temperature? (0-2)}. Returns {choices:[{message}], usage, model} and no stream.",
   "tags": [
    "llm",
    "chat",
    "openai-compatible",
    "x402",
    "usdc"
   ]
  }
 ],
 "resource_paths": [
  "POST /image",
  "POST /caption",
  "POST /speech",
  "POST /transcribe",
  "POST /translate",
  "POST /summarize",
  "POST /embed",
  "POST /chat",
  "POST /classify",
  "POST /ocr",
  "POST /detect-language",
  "POST /batch",
  "POST /image-set",
  "POST /chat?model=llama-3.3-70b"
 ],
 "free_resources": [
  {
   "resource": "https://media.agentexchange.work/",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/",
   "description": "front page: routes, prices, models, how to pay, today's counters (HTML)",
   "mimeType": "text/html"
  },
  {
   "resource": "https://media.agentexchange.work/pricing",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/pricing",
   "description": "prices against Workers AI list prices, limits, fallbacks (HTML)",
   "mimeType": "text/html"
  },
  {
   "resource": "https://media.agentexchange.work/terms",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/terms",
   "description": "terms: payments final, one free replay, content refusals, limits, data (HTML)",
   "mimeType": "text/html"
  },
  {
   "resource": "https://media.agentexchange.work/samples",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/samples",
   "description": "index of free sample requests and responses (JSON)",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/live.json",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/live.json",
   "description": "per-route counters: 402s served, paid calls, successes, failures per day (JSON)",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/health",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/health",
   "description": "service health (JSON)",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/openapi.json",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/openapi.json",
   "description": "OpenAPI 3.1 with x-payment-info on each paid operation",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/.well-known/x402",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/.well-known/x402",
   "description": "x402 manifest: every paid route with the same prices as the challenges",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/.well-known/agent-card.json",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/.well-known/agent-card.json",
   "description": "A2A agent card, one skill per route",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/llms.txt",
   "type": "http",
   "method": "GET",
   "price_usd": 0,
   "free": true,
   "name": "/llms.txt",
   "description": "this list for language models",
   "mimeType": "text/plain"
  },
  {
   "resource": "https://media.agentexchange.work/mcp",
   "type": "http",
   "method": "POST",
   "price_usd": 0,
   "free": true,
   "name": "/mcp",
   "description": "MCP Streamable HTTP endpoint (JSON-RPC 2.0 over POST): tools/list, tools/call returns payment instructions",
   "mimeType": "application/json"
  },
  {
   "resource": "https://media.agentexchange.work/a2a",
   "type": "http",
   "method": "POST",
   "price_usd": 0,
   "free": true,
   "name": "/a2a",
   "description": "A2A JSON-RPC 2.0 endpoint (POST; protocol 0.3.0): message/send, tasks/get, tasks/cancel; free skills complete at once, paid skills answer input-required with the same x402 terms as the HTTP 402 (a2a-x402 v0.1)",
   "mimeType": "application/json"
  }
 ],
 "payment": {
  "protocol": "x402",
  "x402Version": 2,
  "currency": "USDC",
  "networks": [
   {
    "network": "eip155:8453",
    "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c"
   }
  ],
  "facilitator": "https://facilitator.payai.network"
 },
 "discovery": {
  "openapi": "https://media.agentexchange.work/openapi.json",
  "agent_card": "https://media.agentexchange.work/.well-known/agent-card.json",
  "a2a": "https://media.agentexchange.work/a2a",
  "llms_txt": "https://media.agentexchange.work/llms.txt",
  "mcp": "https://media.agentexchange.work/mcp",
  "samples": "https://media.agentexchange.work/samples",
  "pricing": "https://media.agentexchange.work/pricing",
  "terms": "https://media.agentexchange.work/terms",
  "sitemap": "https://media.agentexchange.work/sitemap.xml"
 },
 "version": 1,
 "resource_urls": [
  "https://media.agentexchange.work/image",
  "https://media.agentexchange.work/caption",
  "https://media.agentexchange.work/speech",
  "https://media.agentexchange.work/transcribe",
  "https://media.agentexchange.work/translate",
  "https://media.agentexchange.work/summarize",
  "https://media.agentexchange.work/embed",
  "https://media.agentexchange.work/chat",
  "https://media.agentexchange.work/classify",
  "https://media.agentexchange.work/ocr",
  "https://media.agentexchange.work/detect-language",
  "https://media.agentexchange.work/batch",
  "https://media.agentexchange.work/image-set",
  "https://media.agentexchange.work/chat?model=llama-3.3-70b"
 ],
 "openapi": "/openapi.json",
 "llms": "/llms.txt",
 "mcp": "/mcp",
 "ownershipProofs": []
}