{"uid":"cap_xogjaSAXu-GNnG6mWqyXg","slug":"img402-dev-e29f59df","name":"img402.dev Upload Token","description":"Pay $0.01 USDC to get an upload token for a PERMANENT image (no expiration). Use the returned token to upload via: curl -X POST https://img402.dev/api/upload -H 'X-Upload-Token: TOKEN' -F image=@file.png — The upload returns {url, id, contentType, sizeBytes, expiresAt: null}. Permanent images are retained for the life of the service; if we ever shut down, we will give at least 90 days notice. Supports PNG, JPEG, GIF, WebP up to 10MB. (Images 1MB or under are free AND permanent via POST /api/free — pay only for 1-10MB permanence.)","url":"https://img402.dev/api/upload/token","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":[],"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["token","expiresAt"],"properties":{"token":{"type":"string","description":"Upload token (valid for 10 minutes). Use as X-Upload-Token header when uploading."},"expiresAt":{"type":"string","description":"ISO 8601 token expiration timestamp"}}}}}}},"responseSchema":{"type":"json","example":{"token":"a1b2c3d4e5f6...","expiresAt":"2026-02-08T01:00:00.000Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TkKSmjOnRqIdwNr5Hv3HI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay $0.01 USDC on Base to receive a temporary 10-minute upload token for authenticating image uploads","exampleAgentPrompt":"I need to upload an image to img402 — can you pay the $0.01 USDC fee on Base to get me a temporary upload token?","exampleUseCases":[{"title":"Automated proof-of-work image archival","prompt":"Store this screenshot as proof for our audit trail — pay the Base fee and get the upload token so you can host it on img402 for the next year."},{"title":"Agentic workflow image processing","prompt":"We need to process and upload these product photos through our pipeline — can you grab upload tokens for each one by paying the USDC fees on Base?"},{"title":"Decentralized content backup system","prompt":"Back up these memes and documents to img402 for long-term storage — pay for the upload tokens and handle the whole thing without asking me again."}],"resultDescription":"Returns a short-lived upload token (valid for 10 minutes) and an ISO 8601 expiration timestamp. The token should be passed as the X-Upload-Token header when making the actual image upload request to img402.dev.","failureModes":["Payment not received or insufficient USDC — token not issued","Payment on wrong network (not Base) — rejected","Request malformed or missing required fields — 400 error","Token expires after 10 minutes if not used — must request new token","Rate limiting or service unavailability — 5xx error"],"whenToPreferThis":"Use this endpoint as the first step before uploading an image to img402.dev. It is required to obtain the X-Upload-Token credential that gates the actual upload. Choose this when your workflow involves programmatic image hosting paid with USDC on Base, especially for agentic pipelines that need a crypto-native, permissionless image storage solution with 1-year retention.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:36:34.028Z","isFirstParty":false}