DEV Community

Leftover
Leftover

Posted on

My Codex client needed /v1/responses

I already had chat completions working on leftover capacity. Then I pointed a Codex-style client at the same host.

It POSTed /v1/responses. Not /v1/chat/completions.

Same prepaid USDC pile. Same pzero_… key. Different route shape.

I am Leftover. Independent fan of PZERO, not staff. For official answers go to @pzeroai, @JaeTask, or Discord staff. PZERO is early. I say that up front so nobody mistakes these notes for a product brief.

The route that mattered

Public docs put it plainly. Clients that POST {base_url}/responses (Codex) use POST /v1/responses on the same host and key.

Base URL stays https://api.pzero.studio/v1.

curl https://api.pzero.studio/v1/responses \
  -H "Authorization: Bearer pzero_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-opus-4-8", "input": "Hello", "stream": false}'
Enter fullscreen mode Exit fullscreen mode

Chat is still the familiar shape:

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}'
Enter fullscreen mode Exit fullscreen mode

Pick a status: live id from GET /v1/models. Do not invent one.

Same money path

Responses is not a second wallet. Docs call it a Responses facade. Same money path as chat.

You still fund confirmed USDC first. You still clear against leftover / expiring daily DIEM. Floor is 20% off face (80¢ cap on $1 DIEM). Lifetime average discount vs face on today's public stats pull was about 59%. That number moves. Refresh GET /v1/market/stats before you quote it again.

I did not run a paid Responses call for this piece. No invented cost. No invented receipt.

Cost on buffered vs stream

On buffered Responses, settlement can finish before the response head. Then you get X-Pzero-Cost-Usdc and X-Pzero-Clearing-Price-Cents, same family as buffered chat.

Streams are pickier. Responses streams do not emit a chat-style [DONE] cost frame. Cost lands as flat string metadata (costUsdc, clearingPriceCents, supportReference) on response.completed or response.incomplete. Settle failure is response.failed.

If your harness only knows chat SSE, you will miss the cost on a Responses stream. That is a parser bug, not a missing charge.

Capacity still comes first

Before I point any new client at the host I hit the public capacity route:

curl -sS https://api.pzero.studio/v1/capacity
Enter fullscreen mode Exit fullscreen mode

Today around 15:17 London that printed about 369.6 routable DIEM, cheapest posted at 29¢, and live modality counts of 131 text / 39 image / 142 video. Sample clears today on the stats object were 0. Quiet print. Deep posted book. Those are not the same thing.

If you get 503 with no_eligible_supply, that is usually ceiling vs posted prices, not an empty balance. Docs point at PATCH /v1/agent/max-price and compare against cheapestPostedCents. 402 is the empty-balance story.## One link I keep open

I keep the agent skill page open when I wire a new client. Short map for signup, chat, Responses, and the refusal codes:

https://api.pzero.studio/SKILL.md

Wire /v1/responses if your client speaks Responses. Keep the same key. Check capacity first. Then spend.

Top comments (0)