# Snoovatar Generator — Reddit Avatar Creator (`federyko/reddit-snoovatar-generator`) Actor

Generate a custom or seeded Snoovatar as a PNG or SVG. Use selection filters or re-render an explicit avatar recipe through a Standby HTTP API.

- **URL**: https://apify.com/federyko/reddit-snoovatar-generator.md
- **Developed by:** [Federico](https://apify.com/federyko) (community)
- **Categories:** Social media
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 avatar generateds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Snoovatar Generator — Reddit Avatar Creator

Generate one Reddit Snoovatar per request as a PNG or SVG through a Standby
HTTP API. Use seeded generation, selection filters, or an explicit recipe.

- **Seeded output.** Supply a `seed` to reproduce the same selection.
- **Custom output.** Choose dimensions, colours, and selection filters, or send
  an explicit accessory recipe to `/render`.
- **Portable recipe.** `/random.json` returns the accessory ids and styles for
  one avatar; send that document to `/render` to draw it again.

Each generation request returns one avatar or one avatar recipe. Apify platform
usage and any pricing or request limits are controlled by the Actor's Apify
configuration.

### Pricing

One `snoovatar-generated` event is charged only after an image render succeeds.
The Actor's current configured charge per image is:

| Apify tier | Charge per image |
| --- | ---: |
| FREE | $0.010 |
| BRONZE | $0.008 |
| SILVER | $0.006 |
| GOLD | $0.004 |
| PLATINUM / DIAMOND | $0.004 |

JSON recipes, health checks, validation errors, and cached `304` responses do
not incur that event charge. Apify may also charge its standard Actor-start
event and bills Standby platform usage separately from the image event. Check
the Actor's **Pricing** tab for the effective total before running it.

Users can set a maximum charge for a run in Apify; the Actor returns `402` when
that limit prevents another image charge.

### Quick start

Every Standby request needs your Apify API token as a Bearer token. Use the
Actor's **Standby** endpoint; a normal run does not render an avatar by itself.

```bash
export APIFY_TOKEN="<your-apify-token>"
export BASE="https://USERNAME--reddit-snoovatar-generator.apify.actor"
```

A random avatar as a PNG:

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" "$BASE/random" -o snoo.png
```

The same avatar every time, 512 pixels wide:

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" "$BASE/random?seed=4242&width=512" -o snoo.png
```

The recipe behind it, as JSON:

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" "$BASE/random.json?seed=4242"
```

```json
{
  "accessoryIds": [
    "basic_background_001",
    "outfits_1_body_001",
    "spring_break_festival_hair_008",
    "stranger_thingspt2_face_upper_002",
    "superhero_body_bottom_011",
    "teenager_face_lower_004_VERSION_2"
  ],
  "styles": { "body": "#FFFFFF", "eyes": "#FF4500", "hair": "#C08D41", "facialhair": "#C08D41" },
  "seed": 4242,
  "width": 380,
  "height": 600
}
```

That JSON is the API response sample for `/random.json`. PNG and SVG requests
return the image bytes directly in the HTTP response. These Standby responses
are not copied into the run's dataset or key-value store, so a standard Apify
run has no stored result items to display.

Post that document back and you get the identical image:

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d @recipe.json "$BASE/render" -o same-snoo.png
```

### Endpoints

| Method | Path | Purpose |
| --- | --- | --- |
| `GET` | `/` | Service banner and the Apify readiness probe. |
| `GET` | `/health` | Uptime and avatar generation availability. |
| `GET` | `/random` | Random avatar. Also `/random.png`, `/random.svg`, `/random.json`. |
| `POST` | `/render` | Render an explicit accessory set. |

The full schema is browsable and callable from the **Standby** tab of this
Actor in Apify Console.

### Choosing what gets drawn

Filters shape the random pick itself, so even a narrow filter produces a
complete, well-formed avatar rather than a half-empty one.

| Parameter | What it does |
| --- | --- |
| `seed` | Makes the result reproducible. |
| `width`, `height`, `size`, `scale` | Output dimensions. `size` fits a square box; `scale` multiplies the native 380x600. |
| `format` | `png`, `svg` or `json`. May also be given as a URL suffix. |
| `transparent` | Drops the background so the avatar composites over anything. |
| `premium`, `nft` | Opt into premium or limited-edition accessories. Both are excluded by default. |
| `colors` | Randomise body, eye, hair and facial-hair colours. |
| `body`, `eyes`, `hair`, `facialhair` | Pin those colours to a hex value. |
| `category`, `skip_category` | Include or exclude whole categories such as `head` or `face`. |
| `section`, `skip_section` | Include or exclude sections such as `head_hair` or `face_eyes`. |
| `slot`, `skip_slot` | Include or exclude layer slots such as `hair`. |
| `tag`, `skip_tag` | Include or exclude tagged accessories. |
| `title` | Draw from one named runway look or outfit. |
| `style_unit` | `auto` uses the probabilities below; `runway` or `outfit` explicitly requests that curated style unit, while `none` uses individual accessories only. |
| `runway_probability`, `outfit_probability` | Chance from 0 to 1 for each curated style unit when `style_unit=auto`. Both default to 0.01 (1%); the picker tries a runway first, then an outfit. |
| `density` | How likely each optional slot is to be filled, from 0 to 1. |
| `include` | Accessory ids to always draw, on top of the pick. |
| `include_hidden` | Draw from the hidden section the app itself does not offer. |

The recipe from `/random.json` can be sent to `/render` when you want to
reproduce that result.

### Responses

Image responses carry `X-Avatar-Accessories`, `X-Avatar-Width` and
`X-Avatar-Height`. Seeded and explicit responses also carry a strong `ETag`, so
sending it back as `If-None-Match` returns `304 Not Modified` and saves the
render. Unseeded random responses are `no-store`, since they cannot repeat.

Errors are JSON with a stable `error` code, a human-readable `message` naming
the offending value, and usually a `details` object listing the values that
would have worked.

### Notes

- Each request creates at most one avatar. This does not prevent a caller from
  making repeated requests; each returned PNG or SVG is charged as one
  `snoovatar-generated` event after its render succeeds. JSON recipes, health
  checks, errors and `304` responses are not charged. Configure the event in
  Apify before enabling a billing-enabled build; local development never sends
  charges.
- Accessory ids are validated. An unknown id returns `404` rather than being
  silently skipped.
- This is an independent project and is not affiliated with or endorsed by
  Reddit.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("federyko/reddit-snoovatar-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("federyko/reddit-snoovatar-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call federyko/reddit-snoovatar-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,federyko/reddit-snoovatar-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NYGilsYdD1TXPKjFO/builds/DHrTo5QVNNUZvzTfk/openapi.json
