Pop-campop-cam
CreateStudioPromptsGalleryAPIBlog

pop-cam

Turn your photos into illustrations with our AI-powered infographic generator. No skills needed, get your infographics in seconds.

Quick Links

  • Home
  • Create Infographic
  • Nano Banana
  • Nano Banana Showcase
  • Food Images
  • Outfit Generator
  • Pet Portraits
  • Dog Cartoons
  • Cat Drawings

Resources

  • Blog

Legal

  • Privacy Policy
  • Terms of Service

© 2026 pop-cam, infographic generator. All rights reserved.

P
Pop-cam API
v1.0

Getting Started

Authentication

Endpoints

Reference

Developer SettingsOpenAPI Spec (JSON)

Introduction

The Pop-cam API lets you integrate NanoBanana AI image generation into your agents, workflows, and applications. Transform any photo into a miniature figure illustration with a single API call.

Base URL
https://pop-cam.com/api/v1
Auth
Bearer token (pk_...)
Cost
1 credit per image

This API supports both synchronous (wait for result) and asynchronous (webhook callback) modes, making it easy to integrate whether you need immediate results or background processing.


Quick Start

Get up and running in three steps:

  1. 1
    Create an account & get credits
    Sign up at pop-cam.com and purchase credits from the checkout page.
  2. 2
    Generate an API token
    Go to Developer Settings and click "Generate Token". Copy the pk_... token immediately — it's only shown once.
  3. 3
    Make your first API call
    Use the token to call the generation endpoint.
bash
curl -X POST https://pop-cam.com/api/v1/nanobanana \
  -H "Authorization: Bearer pk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "data:image/png;base64,iVBOR...",
    "prompt": "Create a miniature figure of this character"
  }'

Response

json
{
  "job_id": "a1b2c3d4-e5f6-...",
  "image_url": "https://storage.pop-cam.com/generated/...",
  "used_prompt": "Create a miniature figure of this character",
  "credits_remaining": 42
}

Authentication

All API requests must include your API token in the Authorization header:

http
Authorization: Bearer pk_your_token_here

Tokens are prefixed with pk_ and are 64 hex characters long. Each token is tied to your user account and shares your credit balance.

Keep your tokens secret. Anyone with your token can use your credits. If a token is compromised, revoke it immediately from Developer Settings.

Rate Limits

API usage is limited by your credit balance. Each image generation costs 1 credit. There are no per-minute rate limits, but concurrent requests are subject to server capacity.


Get Your API Token

You need an API token to authenticate requests. Generate one from the UI below, or visit the full Developer Settings page.

API Token Generator

Tokens are shown only once. Copy your token immediately after creating it. If you lose it, revoke the old one and create a new token.

Generate Image

POST/api/v1/nanobanana

Transform an image into a NanoBanana-style miniature figure. Supports both synchronous and asynchronous (webhook) modes.

Request Headers

ParameterTypeDescription
AuthorizationrequiredstringBearer pk_your_token
Content-Typerequiredstringapplication/json

Request Body

ParameterTypeDescription
imagerequiredstringBase64 data URL. Format: data:image/png;base64,...
promptstringCustom generation prompt. Omit to use the default NanoBanana prompt.
webhook_urlstringURL to POST results to when done. Enables async mode (returns HTTP 202).

Synchronous Response (200)

Returned when no webhook_url is provided:

json
{
  "job_id": "a1b2c3d4-e5f6-...",
  "image_url": "https://storage.pop-cam.com/generated/...",
  "used_prompt": "...",
  "credits_remaining": 42
}

Asynchronous Response (202)

Returned when webhook_url is provided. Results are POSTed to your URL.

json
{
  "job_id": "a1b2c3d4-e5f6-...",
  "status": "processing",
  "message": "Your image is being generated. Results will be POSTed to your webhook_url."
}

Example: Python

python
import requests
import base64

with open("photo.png", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://pop-cam.com/api/v1/nanobanana",
    headers={"Authorization": "Bearer pk_YOUR_TOKEN"},
    json={
        "image": f"data:image/png;base64,{b64}",
        "prompt": "Create a miniature figure of this character"
    }
)

data = response.json()
print(f"Image URL: {data['image_url']}")
print(f"Credits remaining: {data['credits_remaining']}")

Example: JavaScript / Node.js

javascript
import fs from "fs";

const imageData = fs.readFileSync("photo.png");
const base64 = imageData.toString("base64");

const response = await fetch("https://pop-cam.com/api/v1/nanobanana", {
  method: "POST",
  headers: {
    "Authorization": "Bearer pk_YOUR_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image: `data:image/png;base64,${base64}`,
    prompt: "Create a miniature figure of this character",
  }),
});

const data = await response.json();
console.log("Image URL:", data.image_url);

Webhooks

Provide a webhook_url in your request to enable async mode. The API returns immediately with HTTP 202 and a job_id, then POSTs the result to your URL when generation completes.

Success Payload

json
{
  "success": true,
  "job_id": "a1b2c3d4-e5f6-...",
  "image_url": "https://storage.pop-cam.com/generated/...",
  "used_prompt": "...",
  "credits_remaining": 41
}

Failure Payload

json
{
  "success": false,
  "job_id": "a1b2c3d4-e5f6-...",
  "error": "Description of what went wrong"
}

Retry Policy

Delivery is attempted up to 3 times with exponential backoff (1s, 2s, 4s). Return a 2xx status to acknowledge receipt.

Tip: Credits are deducted on successful generation even if webhook delivery fails. The image is stored and accessible via its URL. Use the job_id for idempotency.

Manage Tokens (API)

These endpoints use Clerk session auth (cookie or JWT), not API tokens. For a UI, visit Developer Settings.

GET/api/v1/tokens

List all API tokens (masked) for the authenticated user.

json
{
  "tokens": [
    {
      "id": "uuid",
      "name": "My Agent",
      "token": "pk_...a1b2c3",
      "createdAt": "2025-01-15T...",
      "lastUsedAt": "2025-01-16T...",
      "revokedAt": null
    }
  ]
}
POST/api/v1/tokens

Create a new API token. The full token is only returned in this response.

ParameterTypeDescription
namestringLabel for the token (e.g. "My Agent"). Defaults to "Default".
DELETE/api/v1/tokens?id=TOKEN_ID

Revoke a token. It immediately stops working for all requests.


Error Codes

StatusMeaningResolution
400Bad RequestMissing or malformed image field.
401UnauthorizedInvalid or revoked API token.
402Payment RequiredInsufficient credits. Purchase more.
500Server ErrorRetry after a short delay.

Error Response Format

All errors return JSON with an error field:

json
{
  "error": "Human-readable error description"
}

Machine-readable OpenAPI spec: /api/v1/docs