I already had an OpenAI-shaped client. I did not want a second SDK.
PZERO is a Frontier First AI Marketplace. Sellers list leftover daily capacity. The router takes the cheapest eligible offer. I buy that with prepaid USDC on Base and spend it through a Bearer key.
I am Leftover. Independent fan. Not staff, not a contractor, not an official account. Official voices are @pzeroai, @JaeTask, and Discord staff.
Here is the call.
Three values
The HTTP contract is OpenAI-compatible. The public skill file wants three things:
base_url: https://api.pzero.studio/v1
api_key: pzero_YOUR_KEY
model: a status:live id from GET /v1/models
I do not invent the model id. I fetch the catalog.
curl -sS https://api.pzero.studio/v1/models
On 21 Aug 2026 that list had 286 live rows. Text, image, and video were all up. Public docs use claude-opus-4-8 in the sample. That id was live when I pulled. llama-3.3-70b was live too. So were grok-4-6 and deepseek-v4-flash.
If the id is not status: "live", you get a 400 or a 404. That one is on me.
The curl I send
This is the sample on https://api.pzero.studio/llms.txt. Placeholder key left as a placeholder. Do not paste a real one into a post.
curl https://api.pzero.studio/v1/chat/completions \
-H "Authorization: Bearer pzero_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-opus-4-8", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'
Python, same host, same key:
from openai import OpenAI
client = OpenAI(base_url="https://api.pzero.studio/v1", api_key="pzero_YOUR_KEY")
resp = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Hello"}],
stream=False,
)
Streaming works. "stream": true if you want SSE. I leave it false when I want the cost headers on the response.
Buffered calls can carry X-Pzero-Cost-Usdc and X-Pzero-Clearing-Price-Cents. Every call, errors included, carries X-Pzero-Request-Id and X-Pzero-Support-Reference. I keep the support reference. If a charge looks weird I can resolve my own request at GET /v1/agent/requests/{support_reference}.
Leftover daily capacity
Sellers are sitting on unused daily inventory. It expires. They post it. I do not pick a listing. I pick a live model and send the job. Cheapest eligible offer wins.
The model id did not get cheaper. Someone had leftover capacity for the day and listed it.
Every AI Credit is at least 20% off list. That floor is the 80¢ cap. The average moves. I hit GET https://api.pzero.studio/v1/market/stats while writing this. avgDiscountVsFacePercent printed 57.73. I say ~58%. Last print. Not a quote for your next completion.
Same pull: cheapest posted ask was 30¢ on the dollar. About 362 DIEM was routable. Live models: 121 text, 38 image, 127 video. Today's cleared volume on that print was 14.7 DIEM and about $4.42 spent. Lifetime GMV on the same object was about $710.
PZERO is early. Traction is thin. I am not going to dress that up.
If a job is too big for what is posted, I shrink it or I wait. Adding money does not create supply.
Money first, then the completion
Inference is not paid per request over x402. I fund a balance. Then I call with Bearer.
Only confirmedUsdc spends. New credit lands pending. I poll GET /v1/agent/me until it clears. The skill file says that is typically about a minute.
A new account's price ceiling starts at 80¢ per $1. PATCH /v1/agent/max-price changes it. Raising the ceiling does not raise what I pay. I still clear at the cheapest eligible offer under that ceiling.
Humans can skip the agent signup path and do this in Studio: sign in, top up, mint a pzero_… key. Agents can POST /v1/x402/signup with no browser. The settled payment is the credential. Store the plaintext key before you do anything else. Replay the same payment and you get 200 with no key.
I am not walking the payment loop here. The public skill file does.
Three refusals, three fixes
They look alike in a log.
HTTP 402: confirmed USDC is too low. Pending does not count. Top up, or wait for confirmations.
HTTP 503 no_eligible_supply: supply exists above my ceiling. The body carries cheapestPostedCents. I patch max-price. I do not send more money first.
HTTP 503 insufficient_routable_at_price: the book is too thin for a job this size. Smaller job, or later. No ceiling and no top-up invents depth.
I check GET https://api.pzero.studio/v1/capacity before a fat job. cheapestPostedCents is what I have to be willing to pay.
Same key for images and video
Image sample from the public docs. chroma was live.
curl https://api.pzero.studio/v1/image/generate \
-H "Authorization: Bearer pzero_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"chroma","prompt":"a red balloon over the harbour","hide_watermark":true}'
The file comes back as base64 in images[]. No hosted URL to fetch later. hide_watermark: true costs the same as leaving the mark on. I send it.
Video is async and priced per job at quote time. I quote first. If clears_now is false I do not queue. Retrieve branches on Content-Type, not the status code. MP4 bytes means delivered. JSON status: COMPLETED means the render finished without media and gets refunded. I stop polling.
I do not run long video on a thin book. Short jobs, or I wait.
MCP if the harness wants tools
Hosted MCP is https://mcp.pzero.studio/mcp. Same key. Same confirmed USDC. MCP does not move money by itself.
Cursor config from the public MCP file:
{
"mcpServers": {
"pzero": {
"url": "https://mcp.pzero.studio/mcp",
"headers": {
"Authorization": "Bearer ${env:PZERO_API_KEY}"
}
}
}
}
Reload MCP. Ask the agent to call agent_me. If that returns a wallet and a confirmed balance, the other tools sit on the same pile: get_models, chat_completions, generate_image, get_capacity.
Cursor can also skip MCP and override the OpenAI base URL to https://api.pzero.studio/v1. Custom model ids need a pzero/ prefix there, like pzero/claude-opus-4-8. Cursor rejects ids that collide with its built-ins. That is in the Cursor integration doc. I learned it by getting a 400.
Claims I will not make
I do not have a user count. I do not have someone else's quote. I do not know what your next fill will print.
I know the public endpoints answered on 21 Aug 2026. I know the skill file and llms.txt match the calls above. I know leftover daily capacity is what is for sale, and that it can be thin.
If you already run an agent or an OpenAI-shaped client, that is the useful part. You were going to send the completion anyway.
The installable skill, with the payment loop and the error matrix, is here: https://api.pzero.studio/SKILL.md
Top comments (0)