# gochuGEN API > gochuGEN makes ads for a brand from its website: it researches the company, then makes static ads, scripts and videos, and reads competitor ads. This file is the full API reference, written for agents. ## Set up A person asked you to set up gochuGEN. gochuGEN is an MCP server: add it to yourself, and the person approves you in their browser. Do not ask for a key. - The server: `https://app.gochugen.com/mcp` (Streamable HTTP, OAuth). Name it `gochugen`. - Claude Code: run `claude mcp add --transport http gochugen https://app.gochugen.com/mcp`. Then tell the person to type `/mcp`, pick gochugen and sign in. If the tools do not show after that, tell them to start you again. - Cursor, or another client with an MCP config file: add `{"mcpServers": {"gochugen": {"url": "https://app.gochugen.com/mcp"}}}` to it. - A chat app where you cannot add a tool to yourself (ChatGPT, Claude): tell the person to add a custom connector with the address `https://app.gochugen.com/mcp` in the app's settings. - The person's browser opens gochuGEN. They sign up free or log in, and click Approve. Wait for them. - With no MCP and no browser: ask the person for a key from https://app.gochugen.com/app?settings=agents and use the HTTP API below. - When you are connected, call `list_companies`. If it is empty, ask the person for their company website, call `create_company` with it and wait for the job. Then make a first ad with `static_auto` and show it to them. ## Start here - Base URL: https://app.gochugen.com/api/v1 - Auth: send the header `Authorization: Bearer wmk_...` with every call. A person makes the key in the app: Settings, Agents or Settings, API. A key acts as that person: their companies, their plan, their credits. - Bodies and answers are JSON. Send `Content-Type: application/json` with a POST. - `{group}` in a path is the company's `group_id` (from `GET /companies`, or from the answer of `POST /research`). - Long work answers `202` with a `job_id`. Poll `GET /research/{job_id}` every 3 seconds until `status` is `done` or `error`. Do not poll faster. - A file a job made: `GET /company/{group}/creative/{file}`, where `{file}` is the job's `result.file`. - Work costs credits. One credit is $0.00025. `GET /account` shows what is left. A job holds its list price when it starts and is corrected to the real cost when it ends. - Every call below has a `Credits` line: its list price. 0 means the call is free. The answer of a paid call has `credits`: what the job holds. The finished job has `credits`: what it was charged. - Rate limits, for one account in one minute: 120 writes (POST and DELETE), 600 reads (GET). Over the limit the answer is 429 with a `Retry-After` header in seconds. - Calls marked (plan) need a paid plan. Without one the answer is 402. - MCP: the same calls as tools, at https://app.gochugen.com/mcp (Streamable HTTP), with the same `Authorization` header. An agent that speaks OAuth needs no key: it reads `https://app.gochugen.com/.well-known/oauth-protected-resource`, registers itself, and the person approves it in the browser. ## The usual order 1. `POST /research` with the website. Keep `group` from the answer. Poll the job. 2. `POST /company/{group}/handles` with the social profiles, and `POST /company/{group}/refs` with a logo and product photos. Both make better ads. 3. `GET /company/{group}/dossier` to read the brand profile. 4. `POST /company/{group}/flow` with `{"kind": "image", "static": {}}` to make a static ad. Poll the job, then download `result.file`. ## Common tasks - Get the competitors: `GET /company/{group}/adspy`, read `pinned`. Credits: 0. - Get the competitor ads: `GET /company/{group}/adspy`, the items of `ads` with no `kind`. Credits: 0. For new ads run `POST /company/{group}/adspy/scrape` first. - Get the competitor social posts: `GET /company/{group}/adspy`, the items of `ads` with `kind` post. Credits: 0. - Remix a competitor ad: pick an item of `ads` (the highest `run_days` is the longest running, the latest `first_seen` or `posted_at` is the most recent). `POST /company/{group}/adspy/clone` with its id, poll the job, then `POST /company/{group}/flow` with `remix`. Credits: 170 or 420 to read the ad, then 720 for a picture or up to 11,400 for a video. - Make a static ad in auto mode: `POST /company/{group}/flow` with `{"kind": "image", "static": {}}`. Credits: 720. - Make a static ad in manual mode: pick an id from `GET /company/{group}/donors`, then `POST /company/{group}/flow` with any of `static.donor`, `static.headline` and `static.subline`. Credits: 720. - Make a video: `POST /company/{group}/flow` with `kind` video. Credits: up to 11,400. - Write content (a post, ad copy, email subject lines, a landing page, a brief): `POST /company/{group}/ads`. Credits: 280 for one type with 3 versions. - Get or set scheduled content: `GET /company/{group}/calendar` and `POST /company/{group}/calendar`. Credits: 0. - Get or set the brand documents: `GET /company/{group}/dossier`, read `md`. `POST /company/{group}/md` saves one of them. Credits: 0. - Get or set the product photos: `GET /company/{group}/refs`, the items with `kind` product. `POST /company/{group}/refs` with `kind` product adds one, `DELETE /company/{group}/refs/{name}` takes one away. Credits: 0. - Get or set the company logo: `GET /company/{group}/refs`, the item with `kind` logo. `POST /company/{group}/refs` with `kind` logo sets a new one in its place. Credits: 0. ## Errors Every error is JSON: `{"error": "what went wrong"}`. - 400: The request is wrong. The error names the field. - 401: The key is missing, wrong or revoked. - 402: The call needs a plan, or the credits are used up. - 403: The company belongs to another account. Or its profile is not full enough to make ads: the answer then has `score`, and 50 is needed. Add a logo, a category and the social profiles. - 404: No such company, job or file. - 429: Too many requests. Wait the seconds in Retry-After. - 503: The company is busy with another job. Try again in a few seconds. ## Account The account the key belongs to. ### Get the account `GET /account` The plan, the credits left this month, and the limits of the plan. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/account \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "plan": "starter", "credits": { "allowance": 88000, "used": 12400, "left": 75600, "ends": "2026-12-25T00:00:00Z" }, "limits": { "companies": 1, "competitors": 3, "video": true, "storage_gb": 10 }, "rate_limits": { "writes_per_minute": 120, "reads_per_minute": 600 } } ``` ## Companies A company is one brand. It starts from its website. Every other call names the company by its group id. ### List companies `GET /companies` Every company the account owns. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/companies \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "companies": [ { "group_id": "acme-com-1a2b3c4d", "company": "Acme", "website": "acme.com", "scan": "full" } ] } ``` ### Add a company `POST /research` Reads the company's website and its social accounts and writes the brand profile. On a plan it also finds the competitors. The answer is a job. Credits: 100 or more. Body: - `website` (string, required): The company's website, like acme.com. - `company` (string): The brand name. Left out, it is read from the website. ```bash curl -X POST https://app.gochugen.com/api/v1/research \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"website":"acme.com"}' ``` Answer: ```json { "job_id": "8f2c1e04ab37", "status": "queued", "group": "acme-com-1a2b3c4d", "company": "Acme", "poll": "/research/8f2c1e04ab37", "credits": 100 } ``` ## Jobs Work that takes time answers 202 with a job id. Ask for the job every few seconds until its status is done or error. ### Get a job `GET /research/{job_id}` Status is queued, running, done, error or cancelled. A finished job holds its `result`, and `credits`: what it was charged. Null means nothing was charged. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/research/{job_id} \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "job_id": "8f2c1e04ab37", "status": "done", "activity": "done", "result": { "file": "8f2c1e04ab37.png" }, "credits": 720 } ``` ### Stop a job `POST /research/{job_id}/cancel` Stops a job that is queued or running. Work not done is not charged. Credits: 0. ```bash curl -X POST https://app.gochugen.com/api/v1/research/{job_id}/cancel \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{}' ``` Answer: ```json { "job_id": "8f2c1e04ab37", "status": "cancelled" } ``` ### List jobs `GET /jobs` The jobs of the account's companies, newest first. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/jobs \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "jobs": [ { "job_id": "8f2c1e04ab37", "kind": "flow", "group": "acme-com-1a2b3c4d", "status": "done", "credits": 720 } ] } ``` ## Brand What we know about the company, read from its own website and social accounts. Ads are written from this. ### Get the brand profile `GET /company/{group}/dossier` What the company does, who buys and why, and the facts an ad may repeat. `md` holds the three Markdown files as text: the company, the ideal customer profile and the style guide. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/dossier \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "company": "Acme", "as_of": "2026-11-25", "sections": { "profile": { "markdown": "Acme sells ..." }, "audience": { "icp_summary": "Busy parents who ...", "segments": [ { "name": "Busy parents", "who": "Two jobs, no time to cook." } ] } }, "fact_index": [ { "n": 1, "fact": "Acme ships in 2 days." } ], "md": { "company": "# Company profile\n\n## Overview\n*Company:* Acme ...", "icp": "# Ideal customer profile\n\nBusy parents who ...", "style": "# Style guide\n\n## Colours\n- Brand colour: #da3327 ..." } } ``` ### Edit a profile file `POST /company/{group}/md` Save one Markdown file as you wrote it. Ads are written from it. A later read of the website keeps a file saved here. Credits: 0. Body: - `file` (string, required): company, icp or style. - `text` (string, required): The whole file, as Markdown. Up to 40,000 letters. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/md \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"file":"icp","text":"# Ideal customer profile\n\nBusy parents who ..."}' ``` Answer: ```json { "company": "Acme", "md": { "icp": "# Ideal customer profile\n\nBusy parents who ..." } } ``` ### Set ideal customer profiles `POST /company/{group}/icp` Send the whole list. A profile left out is removed. Up to 8. Credits: 0. Body: - `profiles` (array, required): Each one has a name and who they are. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/icp \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"profiles":[{"name":"Busy parents","who":"Two jobs, no time to cook."}]}' ``` Answer: ```json { "profiles": [ { "name": "Busy parents", "who": "Two jobs, no time to cook." } ] } ``` ### Set social profiles and category `POST /company/{group}/handles` The research uses the profiles to tell this company from another one with the same name. A new X or Instagram account is read at once, one job each: `jobs` in the answer lists the job ids. Platforms not sent are kept. Credits: 100 for each new X or Instagram account that is read. 0 for everything else. Body: - `linkedin` (string): The company page, a link or its name. - `x` (string): The X name. - `instagram` (string): The Instagram name. - `tiktok` (string): The TikTok name. - `youtube` (string): The YouTube channel. - `industry` (string): The category, like Food and drink. - `remove` (string[]): Platforms to take off, like ["x"]. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/handles \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"linkedin":"linkedin.com/company/acme","x":"acme"}' ``` Answer: ```json { "handles": { "linkedin": "acme", "x": "acme" }, "jobs": [ "4e1b0c9a7d36" ], "industry": "", "credits": 100 } ``` ### List the brand kit `GET /company/{group}/refs` The logo and the product photos the ads use. `kind` is logo or product. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/refs \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "refs": [ { "name": "logo-9f8e7d6c-logo.png", "kind": "logo" }, { "name": "product-1a2b3c4d-bottle.png", "kind": "product" } ] } ``` ### Download a logo or a product photo `GET /company/{group}/refs/{name}` `{name}` is a name from the brand kit list. URL-encode it. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/refs/{name} \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json (the file) ``` ### Add a logo or a product photo `POST /company/{group}/refs` PNG, JPG or WebP, as base64, up to 10 MB. Kind logo sets the company logo: it takes the place of the logo before it. Kind product adds a product photo. Credits: 0. Body: - `filename` (string, required): The file name, with its ending. - `content_b64` (string, required): The file, base64. - `kind` (string, required): logo or product. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/refs \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"filename":"bottle.png","content_b64":"iVBORw0KGgo...","kind":"product"}' ``` Answer: ```json { "refs": [ { "name": "product-1a2b3c4d-bottle.png", "kind": "product" } ] } ``` ### Delete a logo or a product photo `DELETE /company/{group}/refs/{name}` `{name}` is a name from the brand kit list. The answer is the list that is left. URL-encode the name. Credits: 0. ```bash curl -X DELETE https://app.gochugen.com/api/v1/company/{group}/refs/{name} \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "refs": [] } ``` ## Make ads One call makes one thing: a static ad, a picture, a script or a video. The answer is a job. Its result names the file. The job id is also the id of the thing in the Library and on the calendar. ### List reference ads `GET /company/{group}/donors` Proven ads a static ad can be modelled on. Pass an `id` as `static.donor`. `days` is how long the ad ran. `sets` are ads of one brand in one look. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/donors \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "donors": [ { "id": "1842632480429830-0", "brand": "Olipop", "kind": "online", "days": 212, "headline": "A new kind of soda" } ], "sets": [ { "brand": "Olipop", "kind": "online", "days": 212, "ids": [ "1842632480429830-0", "1330497075872952-1" ] } ], "kinds": [ "online" ] } ``` ### Download a reference ad picture `GET /company/{group}/donors/{id}.jpg` A small picture of one reference ad. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/donors/{id}.jpg \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json (the file) ``` ### Make a static ad, auto `POST /company/{group}/flow` The reference ad is picked and the headline is written for you. The result has the `file`, the `headline` and the `donor` that was used. Credits: 720. Body: - `kind` (string, required): image. - `static` (object, required): Empty: {}. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"image","static":{}}' ``` Answer: ```json { "job_id": "c41d07e2590b", "status": "queued", "poll": "/research/c41d07e2590b", "credits": 720 } ``` The `result` of the finished job: ```json { "asset_id": "c41d07e2590b", "kind": "image", "file": "c41d07e2590b.png", "headline": "Dinner in 10 minutes", "donor": { "id": "1842632480429830-0" } } ``` ### Make a static ad, manual `POST /company/{group}/flow` You pick the parts, in any combination: the reference ad, the headline, the small text. A part left out is done for you: a reference ad is picked, a headline is written. Small text is only set when you send it. Credits: 720. Body: - `kind` (string, required): image. - `static.donor` (string): The `id` of a reference ad. Left out, one is picked. - `static.headline` (string): The headline, up to 120 letters. Left out, one is written. - `static.subline` (string): The small text under the headline, up to 160 letters. Left out, there is none. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"image","static":{"donor":"1842632480429830-0","headline":"Dinner in 10 minutes","subline":"Fresh meals, no cooking"}}' ``` Answer: ```json { "job_id": "c41d07e2590b", "status": "queued", "poll": "/research/c41d07e2590b", "credits": 720 } ``` The `result` of the finished job: ```json { "asset_id": "c41d07e2590b", "kind": "image", "file": "c41d07e2590b.png", "headline": "Dinner in 10 minutes", "donor": { "id": "1842632480429830-0" } } ``` ### Make a video `POST /company/{group}/flow` (plan) A video from words. It needs a `prompt` or a `script`. Credits: up to 11,400, the price of 15 seconds. A shorter video costs less. Body: - `kind` (string, required): video. - `prompt` (string): What happens in the video. - `script` (string): The words that are said. - `aspect` (string): 9:16, 16:9 or 1:1. 9:16 when left out. - `duration` (number): Whole seconds, 4 to 15. - `images` (string[]): Pictures to use: the `result.file` of a job, or a brand kit file as `refs/{name}`. Up to 6. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"video","prompt":"A woman opens the box at her desk and smiles","aspect":"9:16","duration":8}' ``` Answer: ```json { "job_id": "5d0e6b7a91c3", "status": "queued", "poll": "/research/5d0e6b7a91c3", "credits": 11400 } ``` The `result` of the finished job: ```json { "asset_id": "5d0e6b7a91c3", "kind": "video", "file": "5d0e6b7a91c3.mp4" } ``` ### Write a script `POST /company/{group}/flow` A script for a video, or any short text. The finished job has the words in `result.text`. Credits: 50. Body: - `kind` (string, required): text. - `prompt` (string, required): What to write. - `duration` (number): The length of the video the script is for: whole seconds, 4 to 15. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"text","prompt":"A 10 second script about the 2 day delivery"}' ``` Answer: ```json { "job_id": "0b9a44c1d7e2", "status": "queued", "poll": "/research/0b9a44c1d7e2", "credits": 50 } ``` The `result` of the finished job: ```json { "asset_id": "0b9a44c1d7e2", "kind": "text", "file": "0b9a44c1d7e2.txt", "text": "I ordered on Monday ..." } ``` ### Make or edit a picture `POST /company/{group}/flow` A picture from words. With `edit` true the first picture in `images` is changed as the prompt says. Credits: 720. Body: - `kind` (string, required): image. - `prompt` (string, required): What to make, or what to change. - `images` (string[]): Pictures to use: the `result.file` of a job, or a brand kit file as `refs/{name}`. Up to 6. - `edit` (boolean): True changes the picture in `images`. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"image","prompt":"The bottle on a kitchen table in morning light","images":["refs/product-1a2b3c4d-bottle.png"]}' ``` Answer: ```json { "job_id": "e7f2a0c4b815", "status": "queued", "poll": "/research/e7f2a0c4b815", "credits": 720 } ``` The `result` of the finished job: ```json { "asset_id": "e7f2a0c4b815", "kind": "image", "file": "e7f2a0c4b815.png" } ``` ### Download a file `GET /company/{group}/creative/{file}` The picture, video or text a job made. The job's `result.file` is the name. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/creative/{file} \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json (the file) ``` ## Write content Written content for a channel: posts, ad copy, email subject lines, landing page words and briefs. The same types as the Content page of the app. ### Write content `POST /company/{group}/ads` (plan) Writes `variants` versions of each type in `formats`. The answer is a job. The finished job has the words in `result.formats`. Send `async` true. Credits: 160 for each type, plus 40 for each version of it. One type with 3 versions is 280. Body: - `formats` (string[], required): One or more of: x_post, linkedin_post, meta_ad, search_rsa, email_subjects, landing_hero, video_script_30s, ugc_brief, influencer_brief, image_brief. - `variants` (number): How many versions of each type. 3 when left out. - `direction` (string): What the content is about. - `async` (boolean, required): Send true. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/ads \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"formats":["x_post"],"variants":3,"direction":"The 2 day delivery","async":true}' ``` Answer: ```json { "job_id": "3a6f9d20c5b1", "status": "queued", "poll": "/research/3a6f9d20c5b1", "credits": 280 } ``` The `result` of the finished job: ```json { "formats": { "x_post": { "variants": [ { "text": "Order Monday. Eat Wednesday." } ] } }, "stats": { "variants": 3 } } ``` ## Competitors The research finds the competitors. A scan reads their ads and their social posts. Nothing is scanned until you ask. ### List competitors, their ads and their posts `GET /company/{group}/adspy` (plan) `pinned` is the competitor list, with the time of the last scan. `ads` holds their ads and their social posts: a post has `kind` post and a `platform`, an ad has no `kind`. `target` is the competitor. Ads that run now come first, then the longest running. `run_days` is how long an ad ran. For the most recent, sort by `first_seen` (ads) or `posted_at` (posts). `image` is a path under the base URL. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/adspy \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "pinned": [ { "name": "Rival Co", "domain": "rival.com", "scanned_at": "2026-11-26T17:37:56Z" } ], "ads": [ { "id": "meta-1877588933111843", "source": "meta", "target": "Rival Co", "format": "video", "title": "Dinner, solved", "body": "Meals in 10 minutes ...", "cta": "Learn more", "landing": "https://rival.com/", "active": true, "first_seen": "2025-10-27", "last_seen": "2026-11-26", "run_days": 395, "url": "https://www.facebook.com/ads/library/?id=1877588933111843", "image": "/company/acme-com-1a2b3c4d/adspy/media/meta-1877588933111843.jpg" }, { "id": "x-2124653346355331243", "kind": "post", "source": "social", "platform": "x", "target": "Rival Co", "format": "image", "body": "We just shipped ...", "posted_at": "2026-11-22T23:56:46Z", "likes": 255, "comments": 3, "views": 67773, "url": "https://x.com/rivalco/status/2124653346355331243", "image": "/company/acme-com-1a2b3c4d/adspy/media/x-2124653346355331243.jpg" } ], "suggested": null } ``` ### Download a competitor picture `GET /company/{group}/adspy/media/{file}` (plan) The picture of an ad or a post: the `image` of the item. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/adspy/media/{file} \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json (the file) ``` ### Find competitors `POST /company/{group}/rivals/find` (plan) One web search. The answer is a job. What it finds is saved as suggestions: `suggested` in the competitor list. Credits: 200. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/rivals/find \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{}' ``` Answer: ```json { "job_id": "77e0aa13c6d2", "status": "queued", "poll": "/research/77e0aa13c6d2", "credits": 200 } ``` ### Set the competitor list `POST /company/{group}/rivals` (plan) Send the whole list. The plan says how many a company may track. Credits: 0. Body: - `rivals` (array, required): Each one has a name and a website. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/rivals \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"rivals":[{"name":"Rival Co","website":"rival.com"}]}' ``` Answer: ```json { "rivals": [ { "name": "Rival Co", "website": "rival.com" } ] } ``` ### Scan competitors `POST /company/{group}/adspy/scrape` (plan) Reads the ads and the posts of every competitor on the list. The scan starts at once. One scanned in the last week is skipped. Credits: 540 for each competitor read, 100 for an account added by its profile link. 0 when every one was read in the last week. Body: - `only` (string[]): Names of the competitors to read. Left out, all of them. - `force` (boolean): True also reads one scanned in the last week. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/adspy/scrape \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{}' ``` Answer: ```json { "job_id": "b9034c8817fe", "status": "queued", "poll": "/research/b9034c8817fe", "credits": 540 } ``` The `result` of the finished job: ```json { "skipped": [ "Rival Co" ], "fetched": 0, "kept": 0, "total": 95 } ``` ## Remix a competitor ad Two calls. First read the ad: we work out why it works and write our version of its words. Then make the picture or the video from it. Pick the ad from the competitor list: the highest `run_days` is the longest running, the latest `first_seen` or `posted_at` is the most recent. ### Read an ad for a remix `POST /company/{group}/adspy/clone` (plan) The answer is a job. Its result is the recipe: `kind` (image or video), our words (`copy` for a picture, `script` for a video), the `headline`, and for a video the `video_prompt` and the `duration`. Credits: 170 for a picture or a text ad, 420 for a video ad. Body: - `ad_id` (string, required): The `id` of an ad or a post from the competitor list. - `format` (string): The `format` of the ad. Send video for a video ad: it sets the credits held. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/adspy/clone \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"ad_id":"meta-1877588933111843","format":"image"}' ``` Answer: ```json { "job_id": "a2c85e1f0d94", "status": "queued", "poll": "/research/a2c85e1f0d94", "credits": 170 } ``` The `result` of the finished job: ```json { "ad_id": "meta-1877588933111843", "recipe": { "kind": "image", "headline": "Dinner in 10 minutes", "copy": "Dinner in 10 minutes\nFresh meals, no cooking.", "ref_file": "adref-1a2b3c4d.jpg" } } ``` ### Make the remix picture `POST /company/{group}/flow` Our version of a picture ad that was read. `remix` is the id of the ad. Read the ad first. Credits: 720. Body: - `kind` (string, required): image. - `remix` (string, required): The `ad_id` that was read. - `script` (string): The words to set: the recipe's `copy`, or your own. The first line is the headline. - `images` (string[]): Send the recipe's `ref_file`: the picture then keeps the layout of their ad. - `variation` (number): 0 to 1: how far to move from their picture. - `prompt` (string): One change you want. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"image","remix":"meta-1877588933111843","script":"Dinner in 10 minutes\nFresh meals, no cooking.","images":["adref-1a2b3c4d.jpg"]}' ``` Answer: ```json { "job_id": "f41b7c9e2a60", "status": "queued", "poll": "/research/f41b7c9e2a60", "credits": 720 } ``` The `result` of the finished job: ```json { "asset_id": "f41b7c9e2a60", "kind": "image", "file": "f41b7c9e2a60.png" } ``` ### Make the remix video `POST /company/{group}/flow` (plan) Our version of a video ad that was read. Send the recipe's `video_prompt` as the prompt and its `script` as the script. Credits: up to 11,400, the price of 15 seconds. A shorter video costs less. Body: - `kind` (string, required): video. - `prompt` (string, required): The recipe's `video_prompt`. - `script` (string): The recipe's `script`. - `duration` (number): Whole seconds, 4 to 15. The recipe's `duration`, rounded. - `aspect` (string): 9:16, 16:9 or 1:1. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/flow \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"kind":"video","prompt":"Selfie video in a kitchen ...","script":"I stopped cooking on weeknights ...","duration":12,"aspect":"9:16"}' ``` Answer: ```json { "job_id": "6c3d8f5b1e27", "status": "queued", "poll": "/research/6c3d8f5b1e27", "credits": 11400 } ``` The `result` of the finished job: ```json { "asset_id": "6c3d8f5b1e27", "kind": "video", "file": "6c3d8f5b1e27.mp4" } ``` ## Schedule The content calendar: pictures and videos on days. It is a plan of what to post. Nothing is posted for you. ### Get scheduled content `GET /company/{group}/calendar` (plan) Every day that holds something. A day with more than one thing lists the others in `more`. Credits: 0. ```bash curl https://app.gochugen.com/api/v1/company/{group}/calendar \ -H "Authorization: Bearer $GOCHUGEN_KEY" ``` Answer: ```json { "days": { "2026-12-01": { "asset_id": "c41d07e2590b", "kind": "image", "file": "c41d07e2590b.png", "title": "Launch ad", "note": "", "set_at": "2026-11-28T18:07:55Z" } } } ``` ### Set scheduled content `POST /company/{group}/calendar` (plan) One change to one day: send `add`, `remove` or `entry`. A day holds up to 12 things. The answer is the whole calendar. Credits: 0. Body: - `day` (string, required): The day, as YYYY-MM-DD. - `add` (object): One more thing on the day: `asset_id` (the id of the job that made it), `kind` (image or video), `file` (the job's `result.file`), `title`, `note`. - `remove` (string): The `asset_id` to take off the day. - `entry` (object or null): In place of everything on the day. Null clears the day. ```bash curl -X POST https://app.gochugen.com/api/v1/company/{group}/calendar \ -H "Authorization: Bearer $GOCHUGEN_KEY" \ -H "Content-Type: application/json" \ -d '{"day":"2026-12-01","add":{"asset_id":"c41d07e2590b","kind":"image","file":"c41d07e2590b.png","title":"Launch ad"}}' ``` Answer: ```json { "days": { "2026-12-01": { "asset_id": "c41d07e2590b", "kind": "image", "file": "c41d07e2590b.png", "title": "Launch ad", "note": "", "set_at": "2026-11-28T18:07:55Z" } } } ``` ## More - [API docs for people](https://app.gochugen.com/docs)