Skill: blammectrappora/food-photography-generator (version 1.0.0)

--- name: food-photography-generator description: AI food photography generator for restaurants, recipe bloggers, cookbook authors, food brands, and Instagram creators. Generate appetizing hero shots, menu photos, recipe card images, cookbook illustrations, food blog headers, restaurant marketing visuals, gourmet plating photography, dessert close-ups, beverage shots, cafe branding imagery, and culinary editorial content with professional cinematic lighting and styling via the Neta AI image generation API (free trial at neta.art/open). tools: Bash --- # Food Photography Generator AI food photography generator for restaurants, recipe bloggers, cookbook authors, food brands, and Instagram creators. Generate appetizing hero shots, menu photos, recipe card images, cookbook illustrations, food blog headers, restaurant marketing visuals, gourmet plating photography, dessert close-ups, beverage shots, cafe branding imagery, and culinary editorial content with professional cinematic lighting and styling. ## Token Requires a Neta API token (free trial at <https://www.neta.art/open/>). Pass it via the `--token` flag. ```bash node <script> "your prompt" --token YOUR_TOKEN ``` ## When to use Use when someone asks to generate or create ai food photography generator images. ## Quick start ```bash node foodphotographygenerator.js "your description here" --token YOUR_TOKEN ``` ## Options - `--size` — `portrait`, `landscape`, `square`, `tall` (default: `square`) - `--ref` — reference image UUID for style inheritance ## Install ```bash npx skills add blammectrappora/food-photography-generator ```

path: README.md
content: # Food Photography Generator

Generate professional, appetizing food photography images from text descriptions. Built for restaurants, recipe bloggers, cookbook authors, food brands, and Instagram creators who need hero shots, menu photos, recipe card images, cookbook illustrations, blog headers, marketing visuals, gourmet plating photography, dessert close-ups, beverage shots, and culinary editorial content — all rendered with cinematic lighting and styling.

Powered by the Neta AI image generation API (api.talesofai.com) — the same service as neta.art/open.

## Install

Via skills CLI:

```bash
npx skills add blammectrappora/food-photography-generator
```

Via clawhub:

```bash
clawhub install food-photography-generator
```

## Usage

Provide a text description of the dish or scene you want to generate. The script submits the prompt, polls until the image is ready, then prints the resulting image URL to stdout.

```bash
node foodphotographygenerator.js "rustic sourdough bread on wooden cutting board with butter and rosemary, soft window light" --token YOUR_TOKEN
```

Use a different aspect ratio:

```bash
node foodphotographygenerator.js "stack of fluffy pancakes drizzled with maple syrup, blueberries on top" --size portrait --token YOUR_TOKEN
```

Inherit style from a reference image:

```bash
node foodphotographygenerator.js "espresso in a white ceramic cup on marble counter" --ref REFERENCE_PICTURE_UUID --token YOUR_TOKEN
```

Run with no prompt to use the built-in default food photography prompt:

```bash
node foodphotographygenerator.js --token YOUR_TOKEN
```

## Options

| Flag | Description | Default |
| --- | --- | --- |
| (positional) | Text prompt describing the food scene to generate | built-in default |
| `--size` | Aspect ratio: `square` (1024×1024), `portrait` (832×1216), `landscape` (1216×832), `tall` (704×1408) | `square` |
| `--token` | Neta API token | required |
| `--ref` | Reference picture UUID for style inheritance | none |

## Output

Returns a direct image URL.

## Token Setup

This skill requires a Neta API token. Get a free trial token at <https://www.neta.art/open/>.

Pass it on every invocation via the `--token` flag:

```bash
node foodphotographygenerator.js "your prompt" --token YOUR_TOKEN
```

You can also expand a shell variable inline:

```bash
node foodphotographygenerator.js "your prompt" --token "$NETA_TOKEN"
```

The `--token` flag is the only way to provide credentials — the script does not read environment variables or local files.



path: foodphotographygenerator.js
content: #!/usr/bin/env node
import process from 'node:process';

const DEFAULT_PROMPT = "professional food photography, overhead shot of a gourmet dish on rustic ceramic plate, natural soft window light, shallow depth of field, vibrant fresh ingredients, garnishes and herbs, steam rising, warm golden hour tones, restaurant-quality plating, magazine editorial style, 50mm lens look, appetizing color grading";

const SIZES = {
  square: { width: 1024, height: 1024 },
  portrait: { width: 832, height: 1216 },
  landscape: { width: 1216, height: 832 },
  tall: { width: 704, height: 1408 },
};

function parseArgs(argv) {
  const args = { prompt: null, size: 'square', token: null, ref: null };
  const rest = [];
  for (let i = 0; i < argv.length; i++) {
    const a = argv[i];
    if (a === '--size') {
      args.size = argv[++i];
    } else if (a === '--token') {
      args.[REDACTED_SECRET];
    } else if (a === '--ref') {
      args.ref = argv[++i];
    } else if (a.startsWith('--size=')) {
      args.size = a.slice(7);
    } else if (a.startsWith('--token=')) {
      args.[REDACTED_SECRET]);
    } else if (a.startsWith('--ref=')) {
      args.ref = a.slice(6);
    } else {
      rest.push(a);
    }
  }
  if (rest.length > 0) args.prompt = rest.join(' ');
  return args;
}

async function main() {
  const { prompt: promptArg, size, [REDACTED_SECRET], ref } = parseArgs(process.argv.slice(2));

  const [REDACTED_SECRET];

  if (!TOKEN) {
    console.error('\n✗ Token required. Pass via: --token YOUR_TOKEN');
    console.error('  Get yours at: https://www.neta.art/open/');
    process.exit(1);
  }

  const PROMPT = promptArg || DEFAULT_PROMPT;
  const dims = SIZES[size] || SIZES.square;

  const headers = {
    'x-token': TOKEN,
    'x-platform': 'nieta-app/web',
    'content-type': 'application/json',
  };

  const body = {
    storyId: 'DO_NOT_USE',
    jobType: 'universal',
    rawPrompt: [{ type: 'freetext', value: PROMPT, weight: 1 }],
    width: dims.width,
    height: dims.height,
    meta: { entrance: 'PICTURE,VERSE' },
    context_model_series: '8_image_edit',
  };

  if (ref) {
    body.inherit_params = { collection_uuid: ref, picture_uuid: ref };
  }

  console.error(`→ Submitting prompt (${dims.width}×${dims.height})...`);

  const submitRes = await fetch('https://api.talesofai.com/v3/make_image', {
    method: 'POST',
    headers,
    body: JSON.stringify(body),
  });

  if (!submitRes.ok) {
    const text = await submitRes.text();
    console.error(`✗ Submit failed (${submitRes.status}): ${text}`);
    process.exit(1);
  }

  const submitText = await submitRes.text();
  let taskUuid;
  try {
    const parsed = JSON.parse(submitText);
    taskUuid = typeof parsed === 'string' ? parsed : parsed.task_uuid;
  } catch {
    taskUuid = submitText.replace(/^"|"$/g, '').trim();
  }

  if (!taskUuid) {
    console.error('✗ No task_uuid returned');
    process.exit(1);
  }

  console.error(`→ Task: ${taskUuid}`);
  console.error('→ Polling...');

  for (let attempt = 0; attempt < 90; attempt++) {
    await new Promise((r) => setTimeout(r, 2000));
    const pollRes = await fetch(`https://api.talesofai.com/v1/artifact/task/${taskUuid}`, {
      method: 'GET',
      headers,
    });

    if (!pollRes.ok) {
      console.error(`  poll ${attempt + 1}: HTTP ${pollRes.status}`);
      continue;
    }

    const data = await pollRes.json();
    const status = data.task_status;

    if (status === 'PENDING' || status === 'MODERATION') {
      continue;
    }

    const url = (data.artifacts && data.artifacts[0] && data.artifacts[0].url) || data.result_image_url;
    if (url) {
      console.log(url);
      process.exit(0);
    }

    console.error(`✗ Task ended with status "${status}" but no image URL`);
    console.error(JSON.stringify(data, null, 2));
    process.exit(1);
  }

  console.error('✗ Timed out waiting for image');
  process.exit(1);
}

main().catch((err) => {
  console.error(`✗ ${err.message}`);
  process.exit(1);
});


path: package.json
content: name: food-photography-generator
version: 1.0.0
type: module
description: Food Photography Generator — AI-powered ai food photography generator
license: MIT

Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)