Restory
API keys, CLI, and SKILL.md for AI agents

Restory Agent API

Give agents a real media production backend: restore photos, generate images, create videos, upload references, check credits, poll jobs, and hand CDN result URLs to the next workflow.

Use any agent:

OpenClawHermesClaudeChatGPTCodexCursor

Restore photos

Repair, colorize, upscale, and preserve faces from old or damaged photos.

Generate images

Create or edit visuals with Nano Banana, GPT Image 2, Grok Imagine, and references.

Create videos

Submit text, image, and reference video jobs, then poll for Bunny CDN URLs.

CLI Quickstart

Every command prints structured JSON for agents. Use capability discovery before selecting model-specific settings.

npm install -g @restory/cli
restory auth:set --api-key rst_...
restory capabilities
restory restore --method fast --file ./old-photo.jpg
restory jobs:get <imageRecordId> --type image

Command Reference

Restory CLI command reference for media creation agents. OpenClaw, Hermes, Claude, ChatGPT, Codex, Cursor, and custom runners can use these commands for photo restoration, image generation, video generation, uploads, credits, job polling, and gallery reuse.

restory capabilities

Discover current restoration methods, image models, video models, settings, endpoints, feature IDs, and credit costs.

restory credits

Check available credits and plan access before an agent starts a media creation job.

restory auth:set --api-key rst_...

Store a Restory API key locally for CLI-driven OpenClaw, Hermes, Claude, ChatGPT, Codex, Cursor, or custom agent workflows.

restory restore --method fast --file ./old-photo.jpg

Restore, repair, colorize, upscale, or preserve likeness from an uploaded source photo.

restory image:generate --prompt "campaign visual" --model nano-banana-2

Generate or edit images with model, resolution, aspect ratio, and optional reference media settings.

restory video:generate --prompt "slow cinematic push in" --image ./restored.jpg

Create text-to-video or image-to-video jobs and return production-ready Bunny CDN playback URLs.

restory upload --file ./reference.png

Upload reference media once and reuse the returned URL across image and video generation calls.

restory jobs:get <recordId> --type image

Poll asynchronous image or video jobs until completed, failed, or ready for the next workflow step.

restory gallery:list --type image --status completed --limit 10

List completed media records so agents can reuse output URLs, inspect prior work, or hand results to another tool.

Quick-use agent recipes

These are the shortest useful flows for agents. Use OpenAPI for typed clients and the capabilities JSON when a model-specific setting matters.

Full agent recipes

Photo restoration

Restore an old photo, then poll the image record until a Bunny CDN URL is ready.

restory restore --method fast --file ./old-photo.jpg
restory jobs:get <imageRecordId> --type image

Image generation

Generate a campaign image with model, resolution, and aspect-ratio settings.

restory image:generate \
  --prompt "clean ecommerce hero image for a skincare product" \
  --model nano-banana-2 \
  --resolution 2K \
  --aspect-ratio 4:5
restory jobs:get <imageRecordId> --type image

Video generation

Create an 8 second image-to-video job from a restored or uploaded reference.

restory video:generate \
  --prompt "slow cinematic push in, soft daylight" \
  --model seedance-2-0 \
  --image ./restored.jpg \
  --duration 8
restory jobs:get <videoRecordId> --type video

API keys

Pro and Ultra users create hashed API keys on this page, then agents call Restory with `Authorization: Bearer rst_...`.

Discovery

Keep `/api/agent/capabilities` for full machine discovery; use Markdown docs and `/api/agent/openapi` for faster setup and generic API clients.

Docs built for agents

The developer docs cover API, CLI, MCP/skills, auth, examples, and production test workflows.

Restoration methods

Agents can call the same restoration modes as the app, including premium resolution choices and face-reference repair.

Fast & Basic

1 credits

/api/restore-photo

Repair Damage

2 credits

/api/repair-damage

Premium Ultra 2K

4 credits

/api/premium-ultra

Premium Ultra 4K

6 credits

/api/premium-ultra

Colorize Only

3 credits

/api/colorize-photo

Restore Likeness

3 credits

/api/restore-likeness

Basic Upscale

2 credits

/api/upscale-image

Image generation models

Nano Banana Pro

Fast, high-quality image generation

nano-banana-pro

Nano Banana 2

Latest Nano Banana image model with 512 to 4K outputs

nano-banana-2

GPT Image 2

OpenAI image generation with precise text rendering and size controls

gpt-image-2

Grok Imagine

xAI image generation and edit model

grok-imagine

Video generation models

Seedance 2.0

ByteDance Seedance 2.0 with fast and standard text, image, and reference video modes

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 seconds

Kling v2.5 Turbo

Fast, high-quality video generation

5, 10 seconds

Grok Imagine

XAI video generation with text-to-video support

5, 10, 15 seconds

Kling v3 Pro

Premium quality with audio & visual references

5, 10, 12, 15 seconds

Direct API

Agents that do not want the CLI can call the same JSON endpoints directly with an API key.

curl -sS https://www.restory.pics/api/generate-image \
  -H "Authorization: Bearer rst_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "campaign-ready product photo, morning light",
    "modelSlug": "nano-banana-2",
    "resolution": "2K",
    "aspectRatio": "4:5"
  }'