# Introduction

Restory gives AI agents a programmable media backend for restoration, image generation, video generation, uploads, credits, and polling.

## Fast links

- Web page: https://www.restory.pics/agent/docs
- Markdown: https://www.restory.pics/api/agent/docs/markdown
- Capabilities JSON: https://www.restory.pics/api/agent/capabilities
- OpenAPI JSON: https://www.restory.pics/api/agent/openapi
- API keys: https://www.restory.pics/agent

## What is Restory Agent API?

Restory Agent API is a JSON-first media automation surface for AI agents. It turns Restory photo restoration, image generation, and video generation into commands agents can discover and run autonomously.

Use it when an agent needs to restore old photos, generate or edit images, generate videos, upload reference media, check credits, poll queued jobs, and pass Bunny CDN result URLs to another workflow.

## Agent quick-use surfaces

Keep `/api/agent/capabilities` as the full machine discovery payload. Agents that need a faster start can use these friendlier surfaces first:

- Markdown docs per page for quick reading or prompt context.

- OpenAPI JSON for generic API clients and code generation.

- CLI commands for local files and structured JSON output.

- SKILL.md instructions for Codex-style agent environments.

## Core primitives

- Capabilities: discover methods, models, settings, credit costs, and endpoint paths.

- API keys: create bearer keys on Pro and Ultra plans, then call protected endpoints.

- Queued jobs: generation returns IDs immediately; agents poll until completed.

- CDN results: completed jobs return stable Bunny CDN URLs for downstream tools.

## Who should use it?

Use it for agents that build social media visuals, restore photo archives, generate UGC video variants, prepare marketing creative, or chain generated media into schedulers and publishing tools.