# Compute State API — Cheapest Inference Provider Lookup

> Compute State API — Cheapest Inference Provider Lookup is a paid API for AI agents from compute-state-api.replit.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Returns the cheapest compute provider currently able to run an inference job, priced from official vendor pages, with cost breakdown per token.

## Facts

- Endpoint: GET https://compute-state-api.replit.app/v1/cheapest?work=inference&utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compute-state-api-cheapest-inference-provider-lookup-29f0b785
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LEnfZoPui0gJ75-r8T-YL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability compute-state-api-cheapest-inference-provider-lookup-29f0b785
```

Example prompt: What's the cheapest provider that can actually run my inference job right now — give me official list prices, the top recommendation, and any alternatives ranked by cost.

## When to prefer this

Use this endpoint when you need to programmatically identify the cheapest available inference compute based on officially published vendor pricing, rather than relying on manual research or static price lists. Prefer it over GPU-hour endpoints (work=gpu) when your job is token-based inference rather than raw GPU reservation. It is especially useful for cost-optimization agents, dynamic routing systems, and budget-aware orchestration pipelines that need to select a provider at runtime.

## Known failure modes

- Payment not settled — 402 returned if USDC microtransaction has not cleared
- All providers have unknown pricing components — no rank-1 recommendation can be made
- Stale data — pricing data may be outdated if stale_after_s window has elapsed
- Provider temporarily unavailable — disqualified list may grow if vendors are unresponsive
- Malformed response if upstream vendor pages change structure

## How this service works

Tell it the job — tokens or GPU hours — and it returns the cheapest compute that can actually run it, priced from official vendor pages. 0.005 USDC per call, no key, free sample response.

This capability is scoped to work=inference.

## Output

A JSON object containing: the recommended cheapest provider with SKU, estimated cost in USD, and itemized cost components (input tokens, output tokens, cached input) tagged as list/effective/unknown pricing; a ranked list of alternative providers with the same breakdown; a list of disqualified providers with reasons; the data freshness timestamp and staleness window; and payment settlement confirmation.

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "as_of",
  "work",
  "unit",
  "recommendation",
  "alternatives",
  "disqualified",
  "payment"
 ],
 "properties": {
  "unit": {
   "type": "string"
  },
  "work": {
   "enum": [
    "inference",
    "gpu"
   ],
   "type": "string"
  },
  "as_of": {
   "type": "string"
  },
  "payment": {
   "type": "object",
   "required": [
    "network",
    "amount_atomic",
    "settled"
   ],
   "properties": {
    "tx_ref": {
     "type": [
      "string",
      "null"
     ]
    },
    "network": {
     "type": "string"
    },
    "settled": {
     "type": "boolean"
    },
    "amount_atomic": {
     "type": "string"
    }
   }
  },
  "alternatives": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "provider",
     "sku",
     "est_cost_usd",
     "components",
     "why",
     "stale_after_s",
     "source_url",
     "as_of"
    ],
    "properties": {
     "sku": {
      "type": "string"
     },
     "why": {
      "type": "string"
     },
     "as_of": {
      "type": "string"
     },
     "provider": {
      "type": "string"
     },
     "components": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "name",
        "tag",
        "usd",
        "rate_usd",
        "unit"
       ],
       "properties": {
        "tag": {
         "enum": [
          "list",
          "effective",
          "unknown"
         ],
         "type": "string",
         "description": "list — the vendor's published list price.\neffective — a published rate that already reflects the billable\ndiscount for this component (for example a published batch rate).\nunknown — the component exists for this SKU but no official number\ncould be read. A SKU with any unknown component on the path the query\nneeds cannot be rank 1.\n"
        },
        "usd": {
         "type": "number",
         "description": "What this component contributes to est_cost_usd for this job."
        },
        "name": {
         "type": "string",
         "description": "input | output | cached_input | gpu_hour, optionally composed with the vendor's published batch, peak/off-peak and long-context variants (batch_input, input_offpeak, cached_input_long), or cached_input_at_input_rate where the vendor publishes no cheaper cache-hit rate"
        },
        "unit": {
         "type": "string",
         "description": "usd_per_1m_tokens | usd_per_gpu_hour"
        },
        "rate_usd": {
         "type": "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/compute-state-api-cheapest-inference-provider-lookup-29f0b785/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from compute-state-api.replit.app](https://www.zero.xyz/host/compute-state-api.replit.app/llms.txt)
