# modelprices.xyz OpenAI Pricing Table

> modelprices.xyz OpenAI Pricing Table is a paid API for AI agents from modelprices.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns per-token USD costs for every OpenAI model in a single call, including input, output, cache, and batch pricing ranked cheapest first with context window and capability metadata.

## Facts

- Endpoint: GET https://modelprices.xyz/llm/prices/openai
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/modelprices-xyz-openai-pricing-table-264937d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U_wjJSrRJLG8BKcuEBeQK

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 modelprices-xyz-openai-pricing-table-264937d3
```

Example prompt: Pull the full OpenAI model pricing table right now — I want to see every model's input, output, cache, and batch cost per million tokens, sorted cheapest first, so I can pick the most cost-effective one for my app.

## When to prefer this

Choose this endpoint when you need a comprehensive, normalized, and freshly-refreshed pricing snapshot specifically for OpenAI models in a single API call, especially when you need to compare costs across the full OpenAI catalog (including cache and batch tiers) or rank models by cheapest cost. Prefer it over scraping OpenAI's website or maintaining your own pricing table. Use sibling endpoints on modelprices.xyz for cross-provider comparisons (e.g., AWS Bedrock, SambaNova) or for filtered leaderboards (cheapest, largest context, vision-capable).

## Known failure modes

- Stale pricing if the hourly refresh has not yet propagated (data may lag up to 1 hour behind OpenAI's published rates)
- OpenAI adds or removes a model between refresh cycles, causing temporary gaps
- Network timeout or upstream data source unavailability returns a 5xx error
- Pricing denominated only in USD; currency conversion must be done client-side

## How this service works

OpenAI pricing table: per-token cost of every AI model OpenAI serves, in one call — input, output, cache and batch USD per 1M tokens, ranked cheapest first, with context window and capability flags joined in. Compare LLM token cost inside OpenAI and against other providers hosting the same model. Normalized from public sources, cross-checked, refreshed hourly.

## Output

A ranked list of all OpenAI models with their per-token USD prices (input, output, cached input, batch input/output) per 1M tokens, context window sizes, and capability flags such as vision or function-calling support, sorted ascending by cost.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/modelprices-xyz-openai-pricing-table-264937d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from modelprices.xyz](https://www.zero.xyz/host/modelprices.xyz/llms.txt)
