{"uid":"cap_hSSXUbrC605X8EDUdQ_2_","slug":"stablestudio-upload-3d00f8fe","name":"StableStudio Upload","description":"Get a client token for direct upload to Vercel Blob","url":"https://stablestudio.io/api/upload","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"size":{"type":"number","description":"File size in bytes (optional)"},"filename":{"type":"string","description":"Name of the file to upload"},"contentType":{"enum":["image/jpeg","image/jpg","image/png","image/gif","image/webp","video/mp4","video/webm","video/quicktime","audio/mpeg","audio/mp3","audio/wav","audio/x-wav","audio/mp4","audio/aac","audio/ogg"],"type":"string","description":"MIME type of the file"}}},"responseSchema":{"type":"json","example":{"pathname":"uploads/8eecdb7b-bd76-4054-94f9-94c9abb57eab/photo.jpg","uploadId":"8eecdb7b-bd76-4054-94f9-94c9abb57eab","expiresAt":"2026-05-18T20:11:05.273Z","clientToken":"vercel_blob_client_token_example_redacted","curlExample":"curl -X PUT \"https://vercel.com/api/blob/?pathname=uploads%2F8eecdb7b-bd76-4054-94f9-94c9abb57eab%2Fphoto.jpg\" -H \"authorization: Bearer <client-token>\" -H \"x-content-type: image/jpeg\" -H \"x-api-version: 11\" --data-binary @photo.jpg"}},"example":{"request":{"size":102400,"filename":"test-image.png","contentType":"image/png"},"response":{"pathname":"uploads/3e66a67e-d1f0-4d3e-8989-ed6dd791b701/test-image.png","uploadId":"3e66a67e-d1f0-4d3e-8989-ed6dd791b701","expiresAt":"2026-06-11T04:35:14.775Z","clientToken":"vercel_blob_client_wGUnICa1uHl5nIjM_OTEyNzRiNWQ3ZGUxNzU1NThmZDY0NGI1YTJkMDUxZGQ4NDk4YzNhMDc5NDBhOTQ2ZTQxMjdjNGZkOTMwNDU5MC5leUp3WVhSb2JtRnRaU0k2SW5Wd2JHOWhaSE12TTJVMk5tRTJOMlV0WkRGbU1DMDBaRE5sTFRnNU9Ea3RaV1EyWkdRM09URmlOekF4TDNSbGMzUXRhVzFoWjJVdWNHNW5JaXdpWVd4c2IzZGxaRU52Ym5SbGJuUlVlWEJsY3lJNld5SnBiV0ZuWlM5d2JtY2lYU3dpYldGNGFXMTFiVk5wZW1WSmJrSjVkR1Z6SWpveU5qSXhORFF3TURBc0luWmhiR2xrVlc1MGFXd2lPakUzT0RFeE5USTFNVFEzTnpWOQ==","curlExample":"curl -X PUT \"https://vercel.com/api/blob/?pathname=uploads%2F3e66a67e-d1f0-4d3e-8989-ed6dd791b701%2Ftest-image.png\" -H \"authorization: Bearer vercel_blob_client_wGUnICa1uHl5nIjM_OTEyNzRiNWQ3ZGUxNzU1NThmZDY0NGI1YTJkMDUxZGQ4NDk4YzNhMDc5NDBhOTQ2ZTQxMjdjNGZkOTMwNDU5MC5leUp3WVhSb2JtRnRaU0k2SW5Wd2JHOWhaSE12TTJVMk5tRTJOMlV0WkRGbU1DMDBaRE5sTFRnNU9Ea3RaV1EyWkdRM09URmlOekF4TDNSbGMzUXRhVzFoWjJVdWNHNW5JaXdpWVd4c2IzZGxaRU52Ym5SbGJuUlVlWEJsY3lJNld5SnBiV0ZuWlM5d2JtY2lYU3dpYldGNGFXMTFiVk5wZW1WSmJrSjVkR1Z6SWpveU5qSXhORFF3TURBc0luWmhiR2xrVlc1MGFXd2lPakUzT0RFeE5USTFNVFEzTnpWOQ==\" -H \"x-content-type: image/png\" -H \"x-api-version: 11\" --data-binary @<file>"}},"exampleRequest":{"size":102400,"filename":"test-image.png","contentType":"image/png"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_5Znm538q1SgP8pAPEC6vS","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":"Requests a pre-signed upload token for submitting a file (e.g. an image) to StableStudio's Vercel Blob storage in preparation for AI image/video generation.","exampleAgentPrompt":"I want to upload my photo 'portrait.jpg' to StableStudio so I can use it for AI image generation — can you get me an upload token for a JPEG file?","exampleUseCases":null,"resultDescription":"Returns a JSON object containing an uploadId (UUID), a pathname for the stored file, an expiry timestamp for the token, a Vercel blob client token for the actual PUT upload, and a ready-to-use curl command to perform the upload.","failureModes":["Invalid or missing file metadata returns a 400 error","Payment failure or insufficient USDC balance blocks the request","Expired client token renders the upload URL unusable","Unsupported content type may be rejected","Network timeout during token generation"],"whenToPreferThis":"Use this endpoint when you need to stage a file (image/video) into StableStudio's storage system before triggering AI generation. This is a prerequisite upload-initiation step, not the generation call itself. Prefer this when working within the StableStudio pay-per-generation pipeline on a pay-as-you-go basis without subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:37:27.543Z","isFirstParty":false}