Skip to content

aqua2777/StickerCraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StickerCraft

StickerCraft is a small web app for creating anime character presets and generating chibi stickers and extra images with the OpenAI Images API. Build a base reference once, then keep generating assets from it.

This project was created specifically for the OpenAI Community Dev Challenge.

Why it is useful

  • Turns a character idea into usable assets quickly without manual drawing.
  • Keeps everything in one flow: create a reference, then generate stickers and images from it.
  • Lets you generate lots of content with your character through a convenient interface.
  • Stores metadata and files locally, so results are easy to find and reuse.
  • Provides a simple API for integrating into other tools or pipelines.

Features

  • Create and save base references (anime, full body, neutral T-pose).
  • Upload a preset image instead of generating one.
  • Edit an existing reference with a text prompt.
  • Generate chibi stickers from emotion prompts.
  • Generate extra images using a custom prompt plus optional helper image.
  • Local storage for metadata and files; images are served from /files/....

How it works

  1. Create a base reference from text or an upload.
  2. The app stores metadata in storage/db.json and files in storage/files.
  3. Generate stickers or extra images as needed.
  4. The chibi preset is created on demand when the first sticker is generated.
  5. All images are accessible via /files/....

Note: Place screenshots in screenshots/ using the filenames below.

Main screen

This is the entry point to create or select a reference.

Main screen

Creating a reference

Describe a character or upload a base image.

Create reference

Active reference

View the base preset and apply edits.

Active reference

Sticker generation

Generate single chibi stickers from emotion prompts.

Sticker generation

Content generator

Generate extra images with ratio, quality, background, and optional helper image.

Content generator

Tech stack

  • Backend: Node.js + Express
  • Frontend: vanilla HTML/CSS/JS (served by Express)
  • Images: OpenAI Images API (default model gpt-image-1.5)

Quick start

  1. Install deps: npm install
  2. Copy env: cp .env.example .env
  3. Set your key: OPENAI_API_KEY=...
  4. Start: npm run dev
  5. Open: http://localhost:3000

Environment variables

  • OPENAI_API_KEY (required) - OpenAI API key.
  • PORT (default 3000) - server port.
  • OPENAI_BASE_URL (default https://api.openai.com/v1) - API base URL.
  • IMAGE_MODEL (default gpt-image-1.5) - image model.

Data and file storage

  • storage/db.json - local metadata DB.
  • storage/files/ - all generated and uploaded images:
    • references/<id>/base.* - base reference.
    • references/<id>/chibi.png - chibi preset.
    • stickers/<id>/... - stickers.
    • generations/<id>/... - extra generations.
  • storage/uploads/ - temp uploads (removed after processing).

API (detailed)

Service

  • GET /api/health - server health check ({ ok: true }).
  • GET /api/config - client config (image sizes, model).
  • GET /api/emojis - list of emojis and emotion prompts.

References

  • GET /api/references - list all references.
  • GET /api/references/:id - reference plus related assets.
  • POST /api/reference (multipart/form-data) - create a reference:
    • description (string, optional if image is provided)
    • image (file, optional)
    • returns { reference }
  • POST /api/reference/upload (multipart/form-data) - upload a reference without generation:
    • description (string, optional)
    • image (file, required)
    • returns { reference }
  • POST /api/reference/:id/edit (JSON) - edit an existing reference:
    • { "prompt": "new description or changes" }
    • returns { reference }

Stickers

  • POST /api/sticker (JSON) - single sticker:
    • { "referenceId": "...", "emoji": "<emoji>", "emotionPrompt": "optional override" }
    • returns { sticker }
  • DELETE /api/sticker/:referenceId/:id - delete a sticker.

Content generator

  • POST /api/generate (multipart/form-data):
    • referenceId (string, required)
    • prompt (string, optional)
    • quality (low | medium | high | auto, default medium)
    • background (transparent | opaque | auto, default auto)
    • ratio (square | portrait | landscape | auto, default auto)
    • n (1-5, default 1)
    • image (file, optional) - helper input image
    • returns { generations }
  • PATCH /api/generate/:referenceId/:id - update caption:
    • { "caption": "..." }
    • returns { generation }
  • DELETE /api/generate/:referenceId/:id - delete a generation.

Limits and formats

  • Uploads: PNG/JPG/WEBP, up to 10 MB.
  • PNG is recommended for base references.
  • All images are served from /files/... and stored in storage/files.

Tips for character prompts

  • Include colors, outfit, and overall vibe.
  • Short and specific prompts are more stable.
  • Use /api/reference/:id/edit to refine while keeping identity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors