Developer API

Generate production-ready prompts from your backend or scripts. (API access is currently disabled or invite-only)

Authentication

Include your API key in the Authorization header:

Authorization: Bearer prmpt_your_api_key_here

Generate prompt

POST https://prmptly.dev/api/v1/generate

Request body

{
  "input": "Instagram car ad, cinematic, 15 seconds",
  "model": "openai/gpt-4o-mini",
  "tone": "professional",
  "preset": "marketing"
}

Response

{
  "prompt": "You are a senior creative director...",
  "credits_used": 10,
  "balance": 90,
  "generation_id": "uuid"
}

cURL example

curl -X POST https://prmptly.dev/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "Instagram car ad", "model": "openai/gpt-4o-mini", "tone": "professional"}'

Models

Model IDLabelCredits
openai/gpt-4oGPT-4o20
openai/gpt-4o-miniGPT-4o Mini10
anthropic/claude-sonnet-4.6Claude Sonnet 4.620
anthropic/claude-sonnet-4.5Claude Sonnet 4.520
anthropic/claude-3.5-haikuClaude 3.5 Haiku10
google/gemini-2.5-flashGemini 2.5 Flash10
google/gemini-2.5-pro-previewGemini 2.5 Pro20
meta-llama/llama-4-maverickLlama 4 Maverick10
deepseek/deepseek-r1DeepSeek R110

Error codes

  • 401 — Invalid or missing API key
  • 402 — Insufficient credits
  • 429 — Rate limit exceeded
  • 503 — AI service unavailable

Pricing

API usage consumes credits from your account — same as the web app. View credit packs →