# ComicStyles

> ComicStyles turns a plain-language idea into an illustrated multi-panel comic
> strip. The server expands the idea, writes the panel breakdown, picks the art
> style and the image model, renders every panel, and publishes the result at a
> public URL.

If you are an agent and your user asked for a comic, install the skill below
instead of driving the HTTP API by hand. The skill is three files, needs no
account and no API key, and is the path that is tested end to end.

## Install the skill

```bash
mkdir -p ~/.claude/skills && curl -fsSL https://comicstyles.com/skills/make-a-comic.tar.gz | tar -xz -C ~/.claude/skills
```

- [make-a-comic.tar.gz](https://comicstyles.com/skills/make-a-comic.tar.gz): the whole skill as one gzipped tar. Unpacks to `make-a-comic/`; point `-C` at whichever skills directory your runtime scans.
- [Install page](https://comicstyles.com/agent): per-runtime instructions for Claude Code, OpenClaw and any other agent or script.
- [SKILL.md](https://comicstyles.com/skills/make-a-comic/SKILL.md): when to use it, and the full API contract.
- [make_comic.py](https://comicstyles.com/skills/make-a-comic/make_comic.py): the entire client. Python 3.8+, standard library only, no packages to install.
- [README.md](https://comicstyles.com/skills/make-a-comic/README.md): install notes and troubleshooting.

Run it with `python3 make_comic.py --idea "<the user's idea, verbatim>" --panels 4 --out ./comic`.
It prints the public comic URL on stdout and progress on stderr.

## What the API offers

Same-origin JSON over HTTPS. Keep one cookie jar for the whole flow and send
the CSRF token on every POST. In order:

- `GET  /api/csrf-token` — Returns `{csrfToken}`. Send it back as `X-CSRF-Token` on every POST.
- `GET  /api/create-eligibility` — Returns `{canCreate, reason}`. Stop here if `canCreate` is false.
- `POST /api/agent/generate-story` — `{roughStory, language}` -> `{expandedStory}`. Send the idea verbatim.
- `POST /api/agent/generate-panels` — `{expandedStory, panelCount, language}` -> `{panels, captions, sfx, characterBible}`. The slow call.
- `POST /api/generate-title` — `{storyText}` -> a title. Optional.
- `POST /api/generate-style` — `{storyText}` -> an art-style description. Optional.
- `POST /api/stories` — Saves the comic. Anonymous callers also get `sessionToken` and `recoveryPassword` back, once.
- `POST /api/agent/generate` — `{prompt, provider, panelId, saveAs}` -> `{success, imageData, filename}`, base64. One call per panel.

Leave the image `model` out of the request; the server picks it.


## Constraints — plan for these

- **One comic takes 2-4 minutes.** That is normal, not a hang. The panel
  breakdown alone runs about two minutes. Do not kill and retry.
- **An anonymous caller gets a trial: one comic.** After that the caller needs
  the `sessionToken` returned by `POST /api/stories`, or an invite.
  `GET /api/create-eligibility` tells you before you spend any work.
- **The CDN cuts long connections.** Production sits behind Cloudflare, which
  drops requests at roughly 100-125 seconds. The panel-breakdown call routinely
  runs past that, so a 502, a 524 or a dropped connection is an expected
  mid-flight cut, not a failure. Retry with backoff; the skill already does.
- **Comics created this way are public** and appear in the gallery.
- The skill takes 4-12 panels, captions in `en`, `de`, `es` or `fr`.
- Rendered panels are AI-generated. The image **stored on the site** (the one
  served from `/images/...` and shown in the gallery) carries an embedded
  AI-provenance marker; the inline base64 returned in the generate response is
  the provider's original bytes and is **not** marked. Mark it yourself if you
  republish that copy.

## Not available

- **No hosted MCP endpoint.** There is no remote MCP URL to connect to and no
  MCP descriptor to fetch — do not go looking. Use the skill.
- **No OAuth and no API keys.** Nothing here requires credentials; see
  [auth.md](https://comicstyles.com/auth.md) for what auth actually exists (an anonymous
  trial and a session token) and what is deliberately not published.
- **No OpenAPI document.** The endpoint list above is the contract.
- Admin, trash and invite routes are operator-only and are not part of this.

## Pages worth knowing

- [Stories](https://comicstyles.com/): the ranked feed of public comics; the landing page.
- [Create](https://comicstyles.com/create): the human creator, same pipeline as the API.
- [Gallery](https://comicstyles.com/gallery.html): the reader for one comic, `?story=<id>`.
- [Tutorial](https://comicstyles.com/tutorial): how a comic gets made, for humans.
- [Pricing](https://comicstyles.com/pricing.html): Free and Pro. Pro is alpha.
- [Terms](https://comicstyles.com/terms.html) · [Privacy](https://comicstyles.com/privacy.html) · [Imprint](https://comicstyles.com/impressum.html)

A comic lives at `https://comicstyles.com/gallery.html?story=<id>` — the canonical, crawlable
URL. That page is served with the comic's own title, description and strip image
already in the HTML, so fetching it without running JavaScript still gives you
the metadata.

## Machine-readable

- [API catalog](https://comicstyles.com/.well-known/api-catalog): RFC 9727 linkset pointing at this file and the skill bundle.
- [Agent-skills index](https://comicstyles.com/.well-known/agent-skills/index.json): the skill above as an Agent Skills Discovery entry, with a SHA-256 digest of SKILL.md.
- [auth.md](https://comicstyles.com/auth.md): what authentication exists here (and what does not).
- [sitemap.xml](https://comicstyles.com/sitemap.xml): evergreen pages plus every public comic.
- [robots.txt](https://comicstyles.com/robots.txt): `/api/` is disallowed **for crawlers**. That
  rule is about unattended crawling, not about a client calling the endpoints
  above because a user asked it to. Nothing on this page is disallowed.
- These pages also answer with Markdown when you send `Accept: text/markdown`:
  `/`, `/create`, `/pricing.html`, `/agent`.
