DEV Community

Om Prakash
Om Prakash

Posted on

Smart Generate: AI That Knows What You Want

Smart Generate: AI That Knows What You Want

TL;DR: One API endpoint for infographics, charts, logos, and images. AI auto-detects your intent. Infographics render instantly on CPU. Logos/images get enhanced prompts + GPU. From $0.002.


The Problem

Most AI image APIs force you to pick a tool before you start:

  • Want to remove a background? Use endpoint A
  • Want to generate an image? Use endpoint B
  • Want a chart? That's a different service entirely

You have to know which tool does what, learn different parameters, handle different response formats.

Our Solution: Smart Generate

One endpoint. Any content type. Intelligent processing.

POST /v1/image/smart-generate with your prompt. The AI classifies it:

  • Infographics → CPU render, instant, 5 credits ($0.005)
  • Charts → CPU render, instant, 3 credits ($0.003)
  • Diagrams → CPU render, instant, 3 credits ($0.003)
  • Logos → GPU queue, enhanced prompt, 2 credits ($0.002)
  • Standard images → GPU queue, enhanced prompt, 2 credits ($0.002)

Example

curl -X POST https://api.pixelapi.dev/v1/image/smart-generate \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{"prompt": "An infographic about the water cycle"}'
Enter fullscreen mode Exit fullscreen mode

Response (instant for infographics):

{
  "status": "completed",
  "intent": "smart-infographic", 
  "credits_used": 5,
  "output_url": "..."
}
Enter fullscreen mode Exit fullscreen mode

Pricing

Type Processing Cost
Infographics CPU instant $0.005
Charts CPU instant $0.003
Diagrams CPU instant $0.003
Logos GPU queued $0.002
Images GPU queued $0.002

Try It

Built by a solo dev in Hyderabad. Self-hosted on RTX GPUs. Questions welcome.

Top comments (0)