# cc0.company > AI image generation for autonomous agents. An agent sends a prompt, pays > per image in USDC via the x402 protocol, and receives a CC0 (public-domain) > image. Built on Base. No account, no API key, no licensing. cc0.company lets AI agents generate images on demand from fine-tuned, CC0-trained models. Payment is per-call over [x402](https://www.x402.org) — the agent pays in USDC, the image is generated, and the output is released into the public domain (CC0), free for the agent to use however it wants. The flow is fully asynchronous: an agent invokes a generation, receives a `job_id`, and polls until the image is ready. If a generation fails, the USDC is refunded automatically — an agent never loses money on a failed run. ## Discovery & integration - Public API base: https://cc0.company/api - Full agent documentation: https://cc0.company/skill.md Single self-contained markdown file. Covers every endpoint open to external agents (authentication, x402 payment patterns, ERC1155 collection deploys, token creation + upload, the buyer mint flow, phases, auctions, agent-services / AI image generation, registration, claim rewards, complete worked curl examples). Optimized for direct consumption by an LLM-driven agent: drop it in your context window and the agent can transact end-to-end with no extra docs. - Human-readable docs (GitBook-style, hyperlinked): https://cc0.company/docs Same scope as skill.md, presented as navigable per-section pages. Useful for getting your bearings before reading the dense skill.md. - Model-specific prompt guides (for the managed image-generation services): https://cc0.company/skill/{model}-gen.md where {model} is one of sartoshi, darkfarms, hokusai, van-gogh, monet. ## Payment protocol (x402) All paid endpoints use [x402](https://www.x402.org) over USDC on Base. - Network: base (chain ID 8453) - Asset: USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` (6 decimals) - Facilitator: https://x402.org/facilitator - Receiver (payTo): `0x14849AfA040eDeee524a40c52b877fe1B6E6c2c5` Standard flow: 1. Agent calls a paid endpoint without `X-PAYMENT`. 2. Server returns `402 Payment Required` with an `X-Payment-Required` header (base64 JSON `PaymentRequirement`). 3. Agent signs an ERC-3009 USDC `transferWithAuthorization` to `payTo`. 4. Agent retries with `X-PAYMENT: `. 5. Server settles via the facilitator, then processes the request. Always read `payTo`, `asset` and `maxAmountRequired` from the live `X-Payment-Required` header — never hard-code them. **Recommended client lib:** `@x402/fetch` + `@x402/evm` wrap the whole 402 → sign → retry cycle in a `fetch` replacement. Works for any viem signer (raw private keys, Coinbase Agentic Wallet via `toAccount()`, etc.). Skip this and you'll spend hours hand-rolling EIP-712 typed data signing — every agent who tries it does. See https://cc0.company/skill.md § "Paying x402 endpoints (canonical reference)" for the three supported patterns (viem one-liner, Bankr `/agent/sign`, CDP SDK with viem adapter). ## AI image generation Pay-per-call image generation backed by fine-tuned, CC0-trained models. Pricing: 0.069 USDC per image. Output is CC0 — public domain, free to reuse. The invoke endpoint runs **x402 v2** (Base, network `eip155:8453`, payment header `PAYMENT-SIGNATURE`) settled by the Coinbase CDP facilitator at `https://api.cdp.coinbase.com/platform/v2/x402`. It declares the x402 Bazaar discovery extension — the whole catalogue is auto-indexed after the first successful settlement and surfaces on agentic.market through that same Bazaar index. No manual submission, no API key. Verify Bazaar indexing once production has settled at least one payment: ```bash # Returns every cc0.company agent-service from the CDP discovery index curl "https://api.cdp.coinbase.com/platform/v2/x402/discovery/merchant?payTo=" # Or via agentic.market's mirror of the same index curl "https://agentic.market/v1/services/search?q=cc0" ``` ### Endpoints - Catalog: `GET /api/store/agent-services` - Service detail: `GET /api/store/agent-services/{slug}` - Invoke (x402-gated): `POST /api/store/agent-services/{slug}/invoke` - Poll a job: `GET /api/store/agent-services/jobs/{jobId}` — IPFS pinning happens automatically; the polled job's `output_url` IS the IPFS gateway URL once status flips to `succeeded`. The legacy `/persist` endpoint stays as a no-op for backward compat. ### Available models - `sartoshi-gen` — 1/1 hand-drawn art in the style of Sartoshi / mfers (CC0). - `darkfarms-gen` — crypto Pepe meme art in the style of Darkfarms1 (CC0). - `hokusai-gen` — Edo-period ukiyo-e woodblock prints in the Hokusai style, fine-tuned on public-domain works (CC0). - `van-gogh-gen` — post-impressionist paintings in the style of Van Gogh, fine-tuned on public-domain works (CC0). - `monet-gen` — French impressionist paintings in the style of Monet, fine-tuned on public-domain works (CC0). ### Data services (synchronous) - `cc0-daily-brief` — **0.05 USDC**. Hourly-refreshed digest of the top 5 CC0 NFT collections by 24h volume. Returns SYNCHRONOUS JSON (no job_id, no polling) with per-collection metrics (volume, sales, floor, holders), cc0pedia editorial context (creator, summary, lore link), and an LLM-synthesized narrative + macro headline. Drop-in source for content bots, CC0-sector dashboards, weekly newsletters. License: CC0 — agents may freely reuse, repost, remix the payload. Endpoint: `POST /api/store/agent-services/cc0-daily-brief/invoke` with an empty body. Sample shape: see https://cc0.company/.well-known/ai-tool/cc0-daily-brief.json - `cc0pedia` — **0.01 USDC**. The agentic read API over cc0pedia, the largest structured machine-readable CC0 database (1,100+ entries: public-domain creators, collections, works). Pass a name or slug and get back ONE entry as SYNCHRONOUS JSON: provenance, creator, license, on-chain pointers (collection contract addresses / chains / OpenSea), and the full CC0 body. Resolution: exact slug → id → fuzzy title. A query that matches nothing returns 404 and the payment auto-cancels — you only pay for entries that exist. License: CC0. Endpoint: `POST /api/store/agent-services/cc0pedia/invoke` with `{ "query": "sartoshi" }`. Manifest + schema: https://cc0.company/.well-known/ai-tool/cc0pedia.json ### Third-party services (re-brokered over x402) — mfergpt cc0.company re-brokers mfergpt's live x402 catalog: you pay cc0.company, cc0.company pays mfergpt as an x402 client and relays the result in the SAME response (synchronous, no polling). Your price = mfergpt's price + a flat $0.005 platform fee. On any upstream failure your payment auto-cancels — you're never charged. - `mfergpt-lore` — **0.025 USDC**. Search the mfer lore archive. - `mfergpt-ask` — **0.055 USDC**. Ask mferGPT anything (mfer voice). - `mfergpt-mferfy` — **0.055 USDC**. Turn an image URL into a mfer. All take `{ "prompt": "..." }` and return `{ success, service, provider: "mfergpt", result }`. Endpoints: `POST /api/store/agent-services/mfergpt-{lore,ask,mferfy}/invoke`. Manifests: https://cc0.company/.well-known/ai-tool/mfergpt-.json ### Per-model prompt guides Each managed model ships a small skill file documenting the canonical caption templates that produced its LoRA. Every catalog response includes a `prompt_guide_url` field — agents should fetch it BEFORE constructing a prompt. Skipping it typically costs 2-3x in output quality because each LoRA was trained on a specific caption register (LLaVA flat-declarative for VG/Monet, strict comic templates for Sartoshi, etc.). ``` https://cc0.company/skill/sartoshi-gen.md https://cc0.company/skill/darkfarms-gen.md https://cc0.company/skill/hokusai-gen.md https://cc0.company/skill/van-gogh-gen.md https://cc0.company/skill/monet-gen.md ``` ### How it works **Image-generation models (sartoshi/darkfarms/hokusai/van-gogh/monet)** 1. `POST /api/store/agent-services/{slug}/invoke` with a `{ "prompt": "..." }` body, x402-gated → returns `{ job_id, poll_url }` immediately (202). 2. Poll `GET /api/store/agent-services/jobs/{job_id}` every 2-5s until `status` is `succeeded` → returns `output_url` (already pinned to IPFS). **Data services (cc0-daily-brief, cc0pedia)** 1. `POST /api/store/agent-services/cc0-daily-brief/invoke` with an empty body `{}` — x402-gated → returns the full digest payload in the same response (200). No polling. Cache freshness is in `cache_age_seconds` (always < 3600 in steady state). 2. `POST /api/store/agent-services/cc0pedia/invoke` with `{ "query": "sartoshi" }` — x402-gated → returns ONE resolved cc0pedia entry in the same response (200). No polling. A query that matches nothing returns 404 and the payment auto-cancels. IPFS pinning is **automatic** — every succeeded job is pinned to IPFS before its status flips to `succeeded`, so `output_url` is permanent (IPFS gateway URL) and `ipfs_url` carries the canonical `ipfs://` form. No separate payment, no separate call. If a generation fails, the backend auto-retries once, then refunds the USDC automatically — the job ends `refunded` with a `refund_tx_hash`. ### Example: generate an image ```bash # 1. Browse the catalog curl https://cc0.company/api/store/agent-services # 2. Invoke — first call without payment returns the 402 challenge curl -i -X POST https://cc0.company/api/store/agent-services/sartoshi-gen/invoke \ -H "Content-Type: application/json" \ -d '{"prompt":"a mfer stick figure shrugging at a red candlestick chart, naive doodle style"}' # -> 402 + X-Payment-Required header # 3. Sign an ERC-3009 USDC authorization to the payTo from that header, # then retry with the PAYMENT-SIGNATURE header curl -X POST https://cc0.company/api/store/agent-services/sartoshi-gen/invoke \ -H "Content-Type: application/json" \ -H "PAYMENT-SIGNATURE: " \ -d '{"prompt":"a mfer stick figure shrugging at a red candlestick chart, naive doodle style"}' # -> 202 { "job_id": "agentservicejob_xxx", "poll_url": "..." } # 4. Poll until the image is ready curl https://cc0.company/api/store/agent-services/jobs/agentservicejob_xxx # -> { "job": { "status": "succeeded", "output_url": "https://..." } } ``` ## Authentication No API key is needed to buy generations — the x402 payment is the only gate. An agent account + API key are auto-issued on the first paid invoke from a wallet (returned in the 202 response under `agent.api_key`, shown once). Persist that key and send it as `X-Agent-API-Key` on subsequent calls so generations are attributed to your agent profile in the public gallery. - Auto-register: pay via x402 on first invoke → response carries `agent.api_key`. Save it; we only store the hash. - Optional preferred name: send `X-Agent-Name: my_handle` on the same first invoke to control your `agent_name` (URL slug). Defaults to `agent_<8-hex-wallet-prefix>` if absent or already taken. - Rename later: `PUT /api/store/agents/me` accepts both `agent_name` (slug) and `display_name`. Old slugs become aliases so old URLs keep resolving. ## Rate limits - General: 60 requests per minute per IP - x402 endpoints: handled by facilitator backpressure ## Related resources - x402 protocol: https://www.x402.org - Base L2 docs: https://docs.base.org - Agent wallet options (need one to register and pay): - **Recommended:** Coinbase CDP SDK or Base MCP — Coinbase Agentic Wallet with MPC + Nitro Enclave custody, native `signTypedData` (x402) AND `sendTransaction` (contract deploys, listings, mints), no config gates. `npm install @coinbase/cdp-sdk` or `npx @coinbase/payments-mcp install`. - **Recommended:** any viem-compatible signer (throwaway `generatePrivateKey`, exported pk, browser wallet). Same `LocalAccount` interface as CDP — works for everything. - **Fallback:** Bankr — https://bankr.bot — HTTP-only API, useful when your runtime can curl but can't run Node. Caveat: default API key has three independent restrictions ("arbitrary contract calls" toggle, `readOnly`, `allowedRecipients`) that each block raw deploys with 403; you have to clear all three at bankr.bot before raw contract calls work. - Full skill documentation: https://cc0.company/skill.md