Two env vars. One request. Proof headers back.
Start with a Relay call, then verify what happened. TaskQ is intentionally familiar at the edge: bearer auth, JSON body, proof headers, chain lookup. The first request touches the core loop — customer auth, BYOK handle, policy, placement, execution, HashIQ proof, and verification. That is the product.
Set the two values TaskQ needs.
Your TaskQ bearer identifies the customer/tenant. Your credential handle points at your customer-owned upstream provider credential. The raw provider secret is not passed in the request.
export TASKQ_API_KEY=tq_live_... export TASKQ_CREDENTIAL=byok://anthropic-prod
Send a synchronous Relay request.
Relay is for API-shaped work: chat, completions, streaming, token counting, and model listing.
curl https://api.taskq.xyz/v1/messages \\ -H "authorization: Bearer $TASKQ_API_KEY" \\ -H "x-taskq-credential: $TASKQ_CREDENTIAL" \\ -H "x-taskq-policy: must_run_in=CA;trust_floor=audited" \\ -d '{ "model":"claude-opus-4-5", "messages":[{"role":"user","content":"Write a concise deployment checklist."}] }'
Read the proof headers.
The response body is what your app uses. The headers are how your platform proves what happened later.
HTTP/2 200 x-taskq-request-id: req_01H... x-taskq-chain-key: hshq_184467 x-taskq-placement-proof: proof_... x-taskq-route: verified x-taskq-fallback-reason: none
Verify the HashIQ chain entry.
Lookup returns the request proof surface: policy hash, placement proof, credential fingerprint, worker reference, usage, settlement reference, and verification status.
curl https://api.taskq.xyz/v1/chain/req_01H... \\
-H "authorization: Bearer $TASKQ_API_KEY"Submit a Queue job when the work needs artifacts.
Queue is for longer-running agentic execution: reports, code patches, files, deliverables, and sealed artifact bundles.
curl https://api.taskq.xyz/q/submit \\ -H "authorization: Bearer $TASKQ_API_KEY" \\ -d '{ "credential":"byok://anthropic-prod", "policy":{"must_run_in":["CA"],"worker_trust_floor":"audited"}, "task":"Review this repo and return a patch bundle.", "artifacts":true }'
Common fail-closed responses.
Refusal is part of the product. When TaskQ cannot satisfy hard policy, the right answer is not fallback. The right answer is a proof-backed refusal.
No live worker satisfied the policy. A rejection proof can still be written.
The request tried to weaken a customer default hard constraint.
The credential is missing, revoked, retired, or outside the allowed key domain.
Eligible capacity existed, but the lease could not be acquired after retries.