# AI Playable Ad Generator

> Agent skill on puras — published by puras. An AI playable ad generator that turns a short brief plus your game's logo and sprites into a real HTML5 mini-game playable ad. The agent researches your game, designs the core mechanic itself, and engineers it on a purpose-built 2D engine — shipping one self-contained, MRAID-ready HTML file (under 5 MB, assets inlined) you can drop straight into AppLovin, Unity, Meta, TikTok, or any ad network. No coding, no QA cycles, no HTML5 dev team.

- **Skill path:** `puras/game-ad-studio/2d-playable-ad`
- **Skillpack:** Game Ad Studio (`game-ad-studio`)
- **Skillpack ID:** `0dac04f5-5e73-44d7-8c47-adc9977250e5`
- **Deployment version:** v76
- **Human page:** https://puras.co/skills/puras/game-ad-studio/2d-playable-ad
- **API base:** `https://api.puras.co`

## Description

An AI playable ad generator that turns a short brief plus your game's logo and sprites into a real HTML5 mini-game playable ad. The agent researches your game, designs the core mechanic itself, and engineers it on a purpose-built 2D engine — shipping one self-contained, MRAID-ready HTML file (under 5 MB, assets inlined) you can drop straight into AppLovin, Unity, Meta, TikTok, or any ad network. No coding, no QA cycles, no HTML5 dev team.

## Try it free

AI Playable Ad Generator has a free in-browser playground on its page (https://puras.co/skills/puras/game-ad-studio/2d-playable-ad) — load an example or bring your own inputs and run it with a Google sign-in. No credit card, no subscription; runs are usage-based after the free try.

## Input schema

```json
{
  "type": "object",
  "required": [
    "logo",
    "sprites",
    "game_name",
    "cta_text",
    "store_url"
  ],
  "properties": {
    "logo": {
      "type": "image",
      "description": "The game's logo (transparent PNG preferred). Shown on the end card."
    },
    "brief": {
      "type": "string",
      "description": "Free-form direction for the playable: what the game is and what to feature — the core fantasy, the genre, the one mechanic and hook you want, the feeling to convey. The engineer researches the game (and the store listing) and designs the core concept itself, so this is guidance, not a fixed menu. Leave empty to let it infer the best concept from the game name, store URL, and the assets.\n"
    },
    "sprites": {
      "type": "array",
      "items": {
        "type": "image"
      },
      "maxItems": 12,
      "minItems": 1,
      "description": "Transparent PNG sprites of the game's objects. Order matters."
    },
    "cta_text": {
      "type": "string",
      "maxLength": 24,
      "minLength": 2,
      "description": "CTA button text, e.g. \"Play Now\", \"Install\"."
    },
    "headline": {
      "type": "string",
      "maxLength": 40,
      "description": "Short end-card hook (2–5 words). Auto-written if empty."
    },
    "game_name": {
      "type": "string",
      "maxLength": 40,
      "description": "The game's name (used for the title and end card)."
    },
    "store_url": {
      "type": "string",
      "description": "App Store / Google Play URL the CTA opens."
    },
    "brand_color": {
      "type": "color",
      "description": "Accent color for the CTA. Derived from the logo if empty."
    },
    "orientation": {
      "enum": [
        "portrait",
        "landscape",
        "both"
      ],
      "type": "string",
      "description": "Target orientation. Default both."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "playable": {
      "type": "file",
      "description": "The finished self-contained playable ad as one .html file. Drive path to the single-file .html playable; served to readers as a stable media URL. Rendered inline as a live HTML preview.",
      "contentMediaType": "text/html"
    }
  }
}
```

## Examples

### Adorable Gardens — tap-to-merge

A tap-to-merge garden playable on a grid, built from the game's logo, six transparent produce sprites, and a one-line brief — shipped as one self-contained HTML file.

Inputs:

```json
{
  "logo": "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/logo.png",
  "brief": "A simple tap-to-merge garden on a GRID. Tap two adjacent matching plants to merge them up the chain (strawberry → tomato → … → watermelon), fill a small goal, then the install end card. Keep a soft PASTEL/light background and cute art — this deliberately stresses readable HUD text on a light background. One control verb: tap. Lay the board inside the safe area so the score/hint never overlap it.",
  "sprites": [
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/strawberry.png",
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_small.png",
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_big.png",
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/carrot.png",
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/cabbage.png",
    "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/watermelon.png"
  ],
  "cta_text": "Play Free",
  "headline": "Grow your garden!",
  "game_name": "Adorable Gardens",
  "store_url": "https://play.google.com/store/apps/details?id=com.example.adorablegardens",
  "brand_color": "#ff5fa2"
}
```

Outputs:

```json
{
  "playable": "https://api.puras.co/v1/jobs/48cba2e9-41da-4cf6-82c2-a48da9862e7e/assets/2d-playable-ad/48cba2e9/playable.html?sig=728ecc887a8c1c52d228bd66fb97c64876490c7af22eaae01eaa1993ba18cf11"
}
```

## Use this skill

puras runs this skill on its own backend — you send inputs and get the result back. Three ways to call, fastest first:

### 1. MCP server — recommended for coding agents, no API key

Connect the puras MCP server; auth is OAuth in the browser on first call, so there is nothing to paste.

```bash
claude mcp add --transport http puras https://mcp.puras.co/mcp
```

Any MCP client works — point it at `https://mcp.puras.co/mcp` (HTTP transport). Then ask the agent to run `2d-playable-ad` from skillpack `puras/game-ad-studio` with your inputs.

### 2. CLI / Python SDK — `pip install puras`

```bash
pip install puras
puras login            # or set PURAS_API_KEY
puras run puras/game-ad-studio/2d-playable-ad -i key=value
```

From Python:

```python
import puras

client = puras.Client()   # PURAS_API_KEY from env
result = client.run("puras/game-ad-studio/2d-playable-ad", {"logo":"https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/logo.png","brief":"A simple tap-to-merge garden on a GRID. Tap two adjacent matching plants to merge them up the chain (strawberry → tomato → … → watermelon), fill a small goal, then the install end card. Keep a soft PASTEL/light background and cute art — this deliberately stresses readable HUD text on a light background. One control verb: tap. Lay the board inside the safe area so the score/hint never overlap it.","sprites":["https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/strawberry.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_small.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_big.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/carrot.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/cabbage.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/watermelon.png"],"cta_text":"Play Free","headline":"Grow your garden!","game_name":"Adorable Gardens","store_url":"https://play.google.com/store/apps/details?id=com.example.adorablegardens","brand_color":"#ff5fa2"})
```

### 3. HTTP API

`wait=true` blocks until the run reaches a terminal status and returns the result inline.

```bash
curl -X POST "https://api.puras.co/v1/jobs?skillpack=puras/game-ad-studio&wait=true" \
  -H "Authorization: Bearer $PURAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"skill":"2d-playable-ad","inputs":{"logo":"https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/logo.png","brief":"A simple tap-to-merge garden on a GRID. Tap two adjacent matching plants to merge them up the chain (strawberry → tomato → … → watermelon), fill a small goal, then the install end card. Keep a soft PASTEL/light background and cute art — this deliberately stresses readable HUD text on a light background. One control verb: tap. Lay the board inside the safe area so the score/hint never overlap it.","sprites":["https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/strawberry.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_small.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/tomato_big.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/carrot.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/cabbage.png","https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/examples/game-ad-studio/2d-playable-ad/adorable-gardens/watermelon.png"],"cta_text":"Play Free","headline":"Grow your garden!","game_name":"Adorable Gardens","store_url":"https://play.google.com/store/apps/details?id=com.example.adorablegardens","brand_color":"#ff5fa2"}}'
```

Mint an API key (for CLI / SDK / API) from https://puras.co/api-keys.

## Pricing

Runs are billed usage-based from your workspace credit balance — the cost of a job is the sum of the model token (and any media) usage it incurs. There is no per-call platform fee. The playground and the job result report the exact cost of each run.

- Pricing page: https://puras.co/pricing
- Machine-readable model price registry: `https://api.puras.co/v1/pricing`
