{"openapi":"3.1.0","info":{"title":"Airbrush API","version":"1.0.0","summary":"Derived social video insights as JSON: outliers, trends, ads, products, creators, research reports and view predictions.","description":"Every plan includes the API: each month you get as many API credits as your plan's monthly credits, renewed on the 1st. Every answer is { ok, data, meta } and carries provenance, confidence and the list of estimated fields. Longer runs answer 202 with a job to poll at /v1/jobs/{id} (free), or a webhook when it is done. Too many requests in a short time answer 429 with Retry-After."},"servers":[{"url":"https://api.airbrush.ai"}],"security":[{"bearerKey":[]},{"headerKey":[]}],"tags":[{"name":"Image generation","description":"POST /v1/images: one request makes one image, paid in credits."},{"name":"Insights","description":"Calls that spend API credits."},{"name":"Free reads","description":"Calls that never spend credits."}],"paths":{"/v1":{"get":{"operationId":"index","summary":"The endpoint table with the credits per call","description":"Free.","tags":["Free reads"],"x-credits":{"fresh":0,"cached":0},"parameters":[],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Index"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/openapi.json":{"get":{"operationId":"openapi","summary":"This description of the API","description":"Free.","tags":["Free reads"],"x-credits":{"fresh":0,"cached":0},"parameters":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object","description":"This document (not wrapped in the envelope)."}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/outliers":{"get":{"operationId":"outliers","summary":"Breakout videos for a keyword, scored against the creator or niche median","description":"A fresh run costs 10 credits, a cached answer 1 credit. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":10,"cached":1},"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":2},"description":"What to search for, a word or two.","required":true},{"name":"platform","in":"query","schema":{"type":"string","enum":["all","tiktok","instagram","youtube_shorts","youtube"]},"description":"One platform, or all."},{"name":"window","in":"query","schema":{"type":"string","enum":["7d","30d","90d"]},"description":"How far back to look."},{"name":"sort","in":"query","schema":{"type":"string","enum":["outlier","views","recent"]},"description":"Order of the items."},{"name":"min_outlier","in":"query","schema":{"type":"number","enum":[0,3,10]},"description":"Only items at least this many times the median."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"Page of the answer."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Outliers"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/trends":{"get":{"operationId":"trends","summary":"Hooks, formats, hashtags and sounds that are emerging, peaking or cooling","description":"A fresh run costs 2 credits. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":2,"cached":null},"parameters":[{"name":"niche","in":"query","schema":{"type":"string"},"description":"A niche, for example skincare."},{"name":"region","in":"query","schema":{"type":"string","enum":["US","GB","CA","AU","IN","DE","FR","BR"]},"description":"Region."},{"name":"stage","in":"query","schema":{"type":"string","enum":["all","emerging","peaking","cooling"]},"description":"Only rows at this stage."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Trends"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/ads":{"get":{"operationId":"ads","summary":"Long-running ads for a keyword or brand, ranked by run length, placements and versions","description":"A fresh run costs 6 credits, a cached answer 1 credit. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":6,"cached":1},"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":2},"description":"A keyword or a brand.","required":true},{"name":"platforms","in":"query","schema":{"type":"string"},"description":"Comma separated: meta, tiktok."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Two letter country code."},{"name":"mode","in":"query","schema":{"type":"string","enum":["keyword","brand"]},"description":"Search by keyword or by brand."}],"responses":{"200":{"description":"Answered from the cache.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Ads"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"202":{"description":"A fresh run started as a job. Poll the job, or set a webhook on your key.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/products":{"get":{"operationId":"products","summary":"Shop listings with evidence: est. 7-day units, saturation and look-alikes","description":"A fresh run costs 15 credits, a cached answer 1 credit. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":15,"cached":1},"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":2},"description":"A product or niche.","required":true},{"name":"region","in":"query","schema":{"type":"string"},"description":"Region."}],"responses":{"200":{"description":"Answered from the cache.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Products"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"202":{"description":"A fresh run started as a job. Poll the job, or set a webhook on your key.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/creators/{platform}/{handle}":{"get":{"operationId":"creators","summary":"Median views, posting cadence, breakouts and best recent posts of one creator","description":"A fresh run costs 3 credits, a cached answer 1 credit. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":3,"cached":1},"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["tiktok","instagram","youtube","youtube_shorts"]},"description":"The platform."},{"name":"handle","in":"path","required":true,"schema":{"type":"string"},"description":"The public handle, with or without @."}],"responses":{"200":{"description":"Answered from the cache.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Creators"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"202":{"description":"A fresh run started as a job. Poll the job, or set a webhook on your key.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/research":{"post":{"operationId":"research","summary":"A full report: insights, top outliers, hooks, formats and rising searches","description":"A fresh run costs 32 credits, a cached answer 1 credit. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":32,"cached":1},"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","minLength":8,"maxLength":64},"description":"Send the same key on a retry and the call is never charged twice."}],"responses":{"200":{"description":"Answered from the cache.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Research"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"202":{"description":"A fresh run started as a job. Poll the job, or set a webhook on your key.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["q"],"properties":{"q":{"type":"string","minLength":2},"platforms":{"type":"array","items":{"type":"string","enum":["tiktok","instagram","youtube"]}},"region":{"type":"string"},"window":{"type":"string","enum":["7d","30d","90d"]}}}}}}}},"/v1/predict":{"post":{"operationId":"predict","summary":"A likely views range for a post link or a script, with 3 to 5 fixes","description":"A fresh run costs 10 credits. A call that fails gives its credits back.","tags":["Insights"],"x-credits":{"fresh":10,"cached":null},"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","minLength":8,"maxLength":64},"description":"Send the same key on a retry and the call is never charged twice."}],"responses":{"202":{"description":"A fresh run started as a job. Poll the job, or set a webhook on your key.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A TikTok, Reel or Short link."},"script":{"type":"string","description":"The script text. The first line is the hook."},"platform":{"type":"string"},"followers":{"type":"integer","minimum":0},"niche":{"type":"string"}},"anyOf":[{"required":["url"]},{"required":["script"]}]}}}}}},"/v1/jobs/{id}":{"get":{"operationId":"jobs","summary":"The status of a job, then its result","description":"Free.","tags":["Free reads"],"x-credits":{"fresh":0,"cached":0},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The job id from a 202 answer."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/reports/{id}":{"get":{"operationId":"reports","summary":"A report from one of your own research runs, read again","description":"Free.","tags":["Free reads"],"x-credits":{"fresh":0,"cached":0},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The report id."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Reports"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/insights/{id}":{"get":{"operationId":"insights","summary":"One insight card from your own reports","description":"Free.","tags":["Free reads"],"x-credits":{"fresh":0,"cached":0},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The insight id."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/Insights"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/v1/images":{"post":{"operationId":"createImage","tags":["Image generation"],"summary":"Make one image from a prompt","description":"Credits are taken only after the image is made; the cost depends on ai_engine and image_dimensions. Existing integrations on app.airbrush.ai keep working: POST https://app.airbrush.ai/create-art-api is the same endpoint with the same fields, answers and key.","security":[{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"}}}},"responses":{"200":{"description":"The image was made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"}}}},"400":{"description":"Insufficient credits (Your balance is zero.) Engine not supported. Supported engines are: stable-diffusion-xl-pro, flux, midjourney (ai_engine is missing or is not one of the ten names in the table.) Invalid or missing image dimensions. Supported dimensions: small, large, xlarge, portrait, landscape, wide_landscape (image_dimensions is not one of the six shapes.) Invalid content (content is empty or shorter than 2 characters.) Content filtered (The prompt was not allowed.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageError"}}}},"401":{"description":"API key is required (api_key is missing from the body.) Invalid API key (No account has this key.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageError"}}}},"402":{"description":"Insufficient credits (Your balance is lower than the cost of this request.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageError"}}}},"429":{"description":"Rate limit exceeded. Please retry in N seconds. (Too many requests with one key in a minute. Sent only when rate limiting is switched on. Wait the number of seconds given and try again.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageError"}}}},"500":{"description":"The request could not be processed. Please try again. (Something failed while making the image.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageError"}}}}}}}},"webhooks":{"jobFinished":{"post":{"summary":"A job you started finished (job.completed or job.failed).","description":"Sent to the webhook URL set on the key. Header Airbrush-Signature: t=<unix>,v1=<hex>, where v1 is the HMAC-SHA256 of t + \".\" + the raw body with your webhook secret. Reject deliveries older than five minutes. Failed deliveries are retried with backoff.","parameters":[{"name":"Airbrush-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["job.completed","job.failed","ping"]},"data":{"$ref":"#/components/schemas/Job"}}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}}},"components":{"securitySchemes":{"bearerKey":{"type":"http","scheme":"bearer","description":"Your Insights API key (it starts with mxk_), from Keys and usage."},"headerKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"The same key in a header, if you cannot send a Bearer token."}},"schemas":{"Meta":{"type":"object","required":["credits","requestId"],"properties":{"credits":{"type":"object","required":["charged"],"properties":{"charged":{"type":"integer","minimum":0,"description":"API credits this call charged."},"balance":{"type":["integer","null"],"description":"What is left of this month's API allowance."}}},"requestId":{"type":"string"},"cache":{"type":"object","properties":{"hit":{"type":"boolean"}}}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_INPUT","AUTH_REQUIRED","NO_CREDITS","FORBIDDEN","NOT_FOUND","SLOW_DOWN","UPSTREAM_5XX","LLM_FAILED","KILLED","BUDGET","UNCONFIGURED","RATE_LIMITED","TIMEOUT","INTERNAL"]},"message":{"type":"string"},"retryAfter":{"type":"integer"},"upgradeHref":{"type":["string","null"]}}}}},"Index":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"docs":{"type":"string"},"mcp":{"type":"string"},"endpoints":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"fresh":{"type":"integer"},"cached":{"type":["integer","null"]},"mode":{"type":"string"}}}}}},"Outliers":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"estimated":{"type":"array","items":{}},"items":{"type":"array","items":{"type":"object","properties":{"durationSec":{"type":"number"},"engagementRate":{"type":"number"},"excerpt":{"type":"string"},"format":{"type":"string"},"handle":{"type":"string"},"hookType":{"type":"string"},"id":{"type":"string"},"outlier":{"type":"number"},"outlierBasis":{"type":"string"},"platform":{"type":"string"},"postedAt":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"},"views7dEst":{"type":"integer"},"viewsApprox":{"type":"integer"}}}},"page":{"type":"integer"},"pages":{"type":"integer"},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"query":{"type":"object","properties":{"minOutlier":{"type":"number"},"page":{"type":"integer"},"platform":{"type":"string"},"q":{"type":"string"},"sort":{"type":"string"},"window":{"type":"string"}}},"total":{"type":"integer"}}},"Trends":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"estimated":{"type":"array","items":{}},"niche":{"type":"string"},"nicheLabel":{"type":"string"},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"region":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"change":{"type":"number"},"delta":{"type":"number"},"isNew":{"type":"boolean"},"key":{"type":"string"},"kind":{"type":"string"},"lastWeek":{"type":"integer"},"medianOutlier":{"type":"number"},"name":{"type":"string"},"sparkline":{"type":"array","items":{"type":"number"}},"stage":{"type":"string"},"thisWeek":{"type":"integer"},"videos":{"type":"integer"}}}},"sampleVideos":{"type":"integer"},"searches":{"type":"array","items":{"type":"object","properties":{"related":{"type":"array","items":{}},"stage":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"term":{"type":"string"},"volumeLabel":{"type":"string"}}}}}},"Ads":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"estimated":{"type":"array","items":{}},"items":{"type":"array","items":{"type":"object","properties":{"active":{"type":"boolean"},"advertiser":{"type":"string"},"ctrTopPct":{"type":"number"},"daysRunning":{"type":"integer"},"firstSeenAt":{"type":"string","format":"date-time"},"format":{"type":"string"},"hook":{"type":"string"},"id":{"type":"string"},"landingDomain":{"type":"string"},"longevityPct":{"type":"number"},"placements":{"type":"array","items":{}},"platform":{"type":"string"},"rank":{"type":"integer"},"score":{"type":"number"},"url":{"type":"string","format":"uri"},"versions":{"type":"integer"},"why":{"type":"array","items":{}}}}},"noMatch":{"type":"boolean"},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"query":{"type":"object","properties":{"country":{"type":"string"},"mode":{"type":"string"},"platforms":{"type":"array","items":{}},"q":{"type":"string"}}},"total":{"type":"integer"}}},"Products":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"estimated":{"type":"array","items":{}},"items":{"type":"array","items":{"type":"object","properties":{"commissionPct":{"type":"number"},"currency":{"type":"string"},"dailyChecks":{"type":"integer"},"est7dUnits":{"type":"integer"},"hasEstimate":{"type":"boolean"},"id":{"type":"string"},"platform":{"type":"string"},"priceApprox":{"type":"number"},"rating":{"type":"number"},"reviewsApprox":{"type":"integer"},"saturation":{"type":"object","properties":{"label":{"type":"string"},"level":{"type":"integer","minimum":1,"maximum":5},"lookAlikes":{"type":"integer"}}},"seller":{"type":"string"},"soldToDateApprox":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"query":{"type":"object","properties":{"q":{"type":"string"},"region":{"type":"string"}}},"total":{"type":"integer"}}},"Creators":{"type":"object","properties":{"breakouts":{"type":"integer"},"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"enoughPosts":{"type":"boolean"},"estimated":{"type":"array","items":{}},"followersApprox":{"type":"integer"},"handle":{"type":"string"},"hookTypes":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"share":{"type":"number"}}}},"medianViews":{"type":"integer"},"name":{"type":"string"},"outliers":{"type":"array","items":{"type":"object","properties":{"durationSec":{"type":"number"},"excerpt":{"type":"string"},"outlier":{"type":"number"},"platform":{"type":"string"},"postedAt":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"},"viewsApprox":{"type":"integer"}}}},"platform":{"type":"string"},"postsCounted":{"type":"integer"},"postsPerWeek":{"type":"number"},"profileUrl":{"type":"string","format":"uri"},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}}}},"Research":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"estimated":{"type":"array","items":{}},"formats":{"type":"array","items":{"type":"object","properties":{"medianDurationSec":{"type":"number"},"medianOutlier":{"type":"number"},"medianViews7d":{"type":"integer"},"type":{"type":"string"},"videos":{"type":"integer"}}}},"hooks":{"type":"array","items":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"example":{"type":"string"},"medianOutlier":{"type":"number"},"medianViews":{"type":"integer"},"platforms":{"type":"array","items":{}},"text":{"type":"string"},"type":{"type":"string"},"uses":{"type":"integer"}}}},"id":{"type":"string"},"insights":{"type":"array","items":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"figure":{"type":"object","properties":{"isEstimate":{"type":"boolean"},"label":{"type":"string"},"prefix":{"type":"string"},"unit":{"type":"string"},"value":{"type":"number"}}},"id":{"type":"string"},"pattern":{"type":"string"},"platforms":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}},"title":{"type":"string"},"type":{"type":"string"}}}},"niche":{"type":"string"},"outliers":{"type":"array","items":{"type":"object","properties":{"durationSec":{"type":"number"},"engagementRate":{"type":"number"},"excerpt":{"type":"string"},"format":{"type":"string"},"handle":{"type":"string"},"hookType":{"type":"string"},"id":{"type":"string"},"outlier":{"type":"number"},"outlierBasis":{"type":"string"},"platform":{"type":"string"},"postedAt":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"},"views7dEst":{"type":"integer"},"viewsApprox":{"type":"integer"}}}},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"query":{"type":"object","properties":{"platforms":{"type":"array","items":{}},"q":{"type":"string"},"region":{"type":"string"},"window":{"type":"string"}}},"readyAt":{"type":"string","format":"date-time"},"searches":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"term":{"type":"string"},"volumeLabel":{"type":"string"}}}},"stats":{"type":"object","properties":{"baselineMedianViews":{"type":"integer"},"breakouts":{"type":"integer"},"creators":{"type":"integer"},"rising":{"type":"integer"},"videos":{"type":"integer"}}},"status":{"type":"string"},"summary":{"type":"array","items":{}}}},"Predict":{"type":"object","properties":{"baseline":{"type":"object","properties":{"medianViews":{"type":"integer"},"posts":{"type":"integer"},"source":{"type":"string"}}},"caveat":{"type":"string"},"comparablesUsed":{"type":"integer"},"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"estimated":{"type":"array","items":{}},"features":{"type":"object","properties":{"format":{"type":"string"},"hookType":{"type":"string"}}},"finishedAt":{"type":"string","format":"date-time"},"fixes":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string"},"text":{"type":"string"},"topQuartile":{"type":"number"},"yours":{"type":"number"}}}},"id":{"type":"string"},"input":{"type":"object","properties":{"kind":{"type":"string"},"platform":{"type":"string"},"url":{"type":"string","format":"uri"}}},"modelVersion":{"type":"string"},"percentile":{"type":"number"},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"scores":{"type":"object","properties":{"hold":{"type":"number"},"hook":{"type":"string"},"value":{"type":"number"}}},"status":{"type":"string"},"topDecileChance":{"type":"number"},"views7d":{"type":"object","properties":{"p10":{"type":"integer"},"p25":{"type":"integer"},"p50":{"type":"integer"},"p75":{"type":"integer"},"p90":{"type":"integer"}}}}},"Reports":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"estimated":{"type":"array","items":{}},"formats":{"type":"array","items":{"type":"object","properties":{"medianDurationSec":{"type":"number"},"medianOutlier":{"type":"number"},"medianViews7d":{"type":"integer"},"type":{"type":"string"},"videos":{"type":"integer"}}}},"hooks":{"type":"array","items":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"example":{"type":"string"},"medianOutlier":{"type":"number"},"medianViews":{"type":"integer"},"platforms":{"type":"array","items":{}},"text":{"type":"string"},"type":{"type":"string"},"uses":{"type":"integer"}}}},"id":{"type":"string"},"insights":{"type":"array","items":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"figure":{"type":"object","properties":{"isEstimate":{"type":"boolean"},"label":{"type":"string"},"prefix":{"type":"string"},"unit":{"type":"string"},"value":{"type":"number"}}},"id":{"type":"string"},"pattern":{"type":"string"},"platforms":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}},"title":{"type":"string"},"type":{"type":"string"}}}},"niche":{"type":"string"},"outliers":{"type":"array","items":{"type":"object","properties":{"durationSec":{"type":"number"},"engagementRate":{"type":"number"},"excerpt":{"type":"string"},"format":{"type":"string"},"handle":{"type":"string"},"hookType":{"type":"string"},"id":{"type":"string"},"outlier":{"type":"number"},"outlierBasis":{"type":"string"},"platform":{"type":"string"},"postedAt":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"},"views7dEst":{"type":"integer"},"viewsApprox":{"type":"integer"}}}},"provenance":{"type":"object","properties":{"cached":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}}}},"query":{"type":"object","properties":{"platforms":{"type":"array","items":{}},"q":{"type":"string"},"region":{"type":"string"},"window":{"type":"string"}}},"readyAt":{"type":"string","format":"date-time"},"searches":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"term":{"type":"string"},"volumeLabel":{"type":"string"}}}},"stats":{"type":"object","properties":{"baselineMedianViews":{"type":"integer"},"breakouts":{"type":"integer"},"creators":{"type":"integer"},"rising":{"type":"integer"},"videos":{"type":"integer"}}},"status":{"type":"string"},"summary":{"type":"array","items":{}}}},"Insights":{"type":"object","properties":{"confidence":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"pass":{"type":"boolean"}}}},"level":{"type":"integer","minimum":1,"maximum":5},"word":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"figure":{"type":"object","properties":{"isEstimate":{"type":"boolean"},"label":{"type":"string"},"prefix":{"type":"string"},"unit":{"type":"string"},"value":{"type":"number"}}},"id":{"type":"string"},"pattern":{"type":"string"},"platforms":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time"},"kind":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"},"officialName":{"type":"string"},"platform":{"type":"string"}}}},"title":{"type":"string"},"type":{"type":"string"}}},"Job":{"type":"object","properties":{"endpoint":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"id":{"type":"string"},"poll":{"type":"string"},"predictionId":{"type":"string"},"progress":{"type":"object","properties":{"message":{"type":"string"},"pct":{"type":"number"},"stage":{"type":"string"}}},"reportId":{"type":"string"},"result":{"description":"When done: the answer of the job's endpoint (same schema as that endpoint)."},"status":{"type":"string","enum":["queued","running","done","failed","canceled"]}}},"ImageRequest":{"type":"object","required":["content","ai_engine"],"properties":{"api_key":{"type":"string","description":"Your image API key (from the API page in your account). Or send it as Authorization: Bearer or X-API-Key."},"content":{"type":"string","minLength":2,"description":"The prompt."},"ai_engine":{"type":"string","enum":["stable-diffusion-xl-pro","midjourney-v6","slow-picasso","3d-animation-diffusion","anything-v6","wifu-diffusion","analog-diffusion","protogen-45","realistic-vision-v2","flux"],"description":"The model. Send it every time."},"image_dimensions":{"type":"string","enum":["small","large","xlarge","portrait","landscape","wide_landscape"],"default":"large"},"seed":{"type":"integer"},"guidance":{"type":"integer","default":7},"negative_prompt":{"type":"string"}}},"ImageResult":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"image_url":{"type":"string"},"credits_used":{"type":"number"},"credits_remaining":{"type":"number"},"api_calls":{"type":"object","properties":{"total":{"type":"integer"},"monthly":{"type":"integer"}}}}}}},"ImageError":{"type":"object","properties":{"success":{"const":false},"message":{"type":"string"}}}},"responses":{"E400":{"description":"BAD_INPUT: Something in that request did not look right.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"AUTH_REQUIRED: Please log in to continue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E402":{"description":"NO_CREDITS: You need a few more credits for this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"FORBIDDEN: You do not have access to this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"NOT_FOUND: We could not find that.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"SLOW_DOWN: Take a breath, back in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"E500":{"description":"INTERNAL: Our side tripped, not yours. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E502":{"description":"UPSTREAM_5XX: A data source had a hiccup. Please try again. LLM_FAILED: We could not write that one. Your credits are back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"KILLED: This part of Airbrush is resting. Please try again soon. BUDGET: This source is resting, back soon. UNCONFIGURED: This source is resting, back soon. RATE_LIMITED: This source is busy. Please try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E504":{"description":"TIMEOUT: That took too long. Please try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"externalDocs":{"description":"Docs, quick start and MCP setup","url":"https://app.airbrush.ai/x/api/insights"}}