AI Inference · x402 · early usage

Llama API - pay per call, no API key

Llama API - pay per call, no API key. OpenAI-format chat completions on meta-llama/llama-4-maverick, pinned to DeepInfra for reliability. You sign a fixed price computed from your max_tokens; unused tokens are not refunded. 20s server-side timeout - never cha…

by x402.agentindex.world · discovered, not yet claimed by its owner · updated 2026-10-10

30d calls2
30d payers2
MethodPOST
Outputjson

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

Llama API - pay per call, no API key. OpenAI-format chat completions on meta-llama/llama-4-maverick, pinned to DeepInfra for reliability. You sign a fixed price computed from your max_tokens; unused tokens are not refunded. 20s server-side timeout - never charged if it fires; set your client timeout to 30s. Try GET /llm/llama/sample.

Tags: Llama API · llama 4 api · meta llama api · pay per call llm · bazaar

Call contract

Method
POST
Input
json
Output
json
Last paid call
2026-10-10
Input example from Bazaar metadata
{
  "max_tokens": 150,
  "messages": [
    {
      "content": "Summarize in one sentence: The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. It was designed by Gustave Eiffel's engineering company and built as the entrance arch for the 1889 World's Fair. Initially criticized by some of France's leading artists and intellectuals for its design, it has become a global cultural icon of France and one of the most recognizable structures in the world, attracting millions of visitors every year.",
      "role": "user"
    }
  ]
}
Output example
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "The Eiffel Tower, a wrought-iron lattice tower in Paris, France, was designed by Gustave Eiffel's company for the 1889 World's Fair and has since become a global cultural icon of France, attracting millions of visitors annually.",
        "role": "assistant"
      }
    }
  ],
  "created": 1790781075,
  "id": "gen-1790781075-Lyd15GuBV6xAvA6HlOvf",
  "model": "meta-llama/llama-4-maverick",
  "object": "chat.completion",
  "provider": "DigitalOcean",
  "usage": {
    "completion_tokens": 51,
    "cost": 0.000062,
    "prompt_tokens": 106,
    "total_tokens": 157
  },
  "x402_receipt": {
    "latency_ms": 1700,
    "model_served": "meta-llama/llama-4-maverick",
    "price_paid_usdc": 0.001,
    "upstream": "llm/llama"
  }
}

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/33918.json for the price and payment options.
  3. Pay. Call GET https://x402.agentindex.world/llm/llama. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.001 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base
Demand
2 calls · 2 unique payers in 30d (public x402 Bazaar data)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.0010xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d300s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "amountUsd": 0.001,
    "maxTimeoutSeconds": 300
  }
]

Schemas

Output schema (JSON Schema)
{
  "properties": {
    "example": {
      "properties": {
        "choices": {
          "items": {
            "type": "object"
          },
          "type": "array"
        },
        "id": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "usage": {
          "type": "object"
        },
        "x402_receipt": {
          "type": "object"
        }
      },
      "required": [
        "choices",
        "usage"
      ],
      "type": "object"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
Example shape — generated from the schema, not a captured live response
{
  "example": {
    "choices": [
      {}
    ],
    "id": "string",
    "model": "string",
    "usage": {},
    "x402_receipt": {}
  },
  "type": "string"
}

Examples

curl
curl "https://x402.agentindex.world/llm/llama"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://x402.agentindex.world/llm/llama");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://x402.agentindex.world/llm/llama")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
x402.agentindex.world
Endpoint
https://x402.agentindex.world/llm/llama
Machine-readable
/resources/33918.json