API Reference
Agent-first API for AI image generation. All responses are JSON.
Quick Start
# Install the CLI
curl -fsSL https://crevisto.com/install.sh | sh
# Or with Go / Homebrew
go install github.com/javimosch/crevisto@latest
brew tap javimosch/tap && brew install crevisto
# Get a free trial token (5 credits, no email needed)
crevisto trial
# Generate your first image
crevisto generate logo-maker --input description="A tech startup logo" --output ./logo.webp
Authentication
Crevisto uses bearer tokens. Trial tokens are auto-provisioned — invent any string ≥16 chars.
# Get a trial token
curl -X POST https://crevisto.com/v1/trial \
-H "Content-Type: application/json" \
-d '{"token":"my-agent-token-12345678"}'
# Response: { "ok": true, "token": "...", "credits": 5 }
# Use it for all requests
curl -H "Authorization: Bearer my-agent-token-12345678" \
https://crevisto.com/v1/whoami
Trial Lifecycle
1. Trial (5 free credits)
Auto-provisioned on first API call. No email needed. Generations are auto-public in the gallery.
2. Claim (bind email)
When trial credits run out, bind an email to unlock more credits. Verification sent via email.
3. BYOK (unlimited, zero credits)
Attach an OpenRouter API key for unlimited generations at zero credit cost. Key is encrypted (AES-256-GCM).
API Endpoints
POST /v1/trial
Create a trial account. Body: { "token": "string" }
curl -X POST https://crevisto.com/v1/trial \
-H "Content-Type: application/json" \
-d '{"token":"my-agent-token-12345678"}'
GET /v1/whoami
Check credit balance and trial status. Requires bearer token.
curl -H "Authorization: Bearer TOKEN" \
https://crevisto.com/v1/whoami
GET /v1/tools
List all 100 AI tools with inputs, credit costs, and descriptions.
curl -H "Authorization: Bearer TOKEN" \
https://crevisto.com/v1/tools
POST /v1/tools/:slug/execute
Generate an image. Body: { "inputs": { ... }, "isPublic": false }
curl -X POST https://crevisto.com/v1/tools/logo-maker/execute \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{"inputs":{"description":"A tech startup logo","style":"minimal"}}'
POST /app/claim
Bind email to trial account. Body: { "token": "...", "email": "..." }
POST /v1/byok
Attach OpenRouter API key. Body: { "apiKey": "sk-or-v1-..." }
GET /v1/gallery
Browse public gallery. Query params: ?tool=slug&limit=24&skip=0
POST /v1/gallery/:id/toggle
Toggle your generation public/private. Requires bearer token.
CLI Commands
| Command | Purpose |
|---|---|
| crevisto trial | Get a free trial token (5 credits) |
| crevisto tools | List all 100 AI tools (JSON) |
| crevisto generate <slug> | Generate an image |
| crevisto whoami | Check credit balance |
| crevisto claim --email | Bind email to trial account |
| crevisto set-key <key> | Attach BYOK key (unlimited) |
| crevisto gallery | Browse public gallery |
| crevisto gallery-download <id> | Download a gallery image |
| crevisto gallery-toggle <id> | Toggle public/private |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 80-89 | Client error (bad input, not found) |
| 90 | Resource exhausted (trial limit reached) |
| 91 | Auth required (no token / invalid) |
| 100-119 | Recoverable server error (retry) |
| 120+ | Non-recoverable error |
Links
Popular tools to try
crevisto generate linkedin-avatar — LinkedIn Avatar
crevisto generate logo-maker — Logo Maker
crevisto generate photo-restoration — Photo Restoration
crevisto generate anime-avatar — Anime Avatar
crevisto generate background-remover — Background Remover
crevisto generate youtube-thumbnail — YouTube Thumbnail