SDKs, libraries and tools
Official clients for Python, JavaScript, Go, PHP and Java, a CLI, an MCP server for AI agents and plugins for the tools you already use. All open source.
Quickstart
Install the client, set POPNOW_API_KEY, and generate your first image.
pip install popnow
export POPNOW_API_KEY="sk-popnow-..."from popnow import PopNow
client = PopNow() # reads POPNOW_API_KEY
task = client.images.generate(
model="google/nano-banana-2.1/text-to-image",
prompt="A small red fox curled up in a teacup, soft morning light",
)
print(task.state, task.urls[0])
client.files.download(task.assets[0], "fox.png")npm install popnow
export POPNOW_API_KEY="sk-popnow-..."import { PopNow } from "popnow";
const popnow = new PopNow(); // reads POPNOW_API_KEY
const task = await popnow.jobs.createAndWait({
model: "google/nano-banana-2.1/text-to-image",
input: { prompt: "A small red fox curled up in a teacup, soft morning light" },
});
console.log(task.state, task.output?.assets?.[0]?.url);go get github.com/popnow-ai/popnow-go
export POPNOW_API_KEY="sk-popnow-..."package main
import (
"context"
"log"
popnow "github.com/popnow-ai/popnow-go"
)
func main() {
ctx := context.Background()
client, err := popnow.New(popnow.Options{}) // reads POPNOW_API_KEY
if err != nil {
log.Fatal(err)
}
request := popnow.CreateTaskInput{
Model: "google/nano-banana-2.1/text-to-image",
Input: map[string]any{"prompt": "A small red fox curled up in a teacup, soft morning light"},
}
// One idempotency key per piece of work: a resend returns the original task.
task, err := client.CreateTask(ctx, request, "fox-teacup-1", popnow.CreateTaskOptions{})
if err != nil {
log.Fatal(err)
}
final, err := client.WaitForTerminal(ctx, task.TaskID, popnow.WaitOptions{})
if err != nil {
log.Fatal(err)
}
for _, asset := range final.ReadyAssets() {
log.Println(final.State, asset.URL)
}
}composer require popnow/popnow
export POPNOW_API_KEY="sk-popnow-..."<?php
require __DIR__ . '/vendor/autoload.php';
use PopNow\Client;
$client = new Client(); // reads POPNOW_API_KEY
$task = $client->createTask(
model: 'google/nano-banana-2.1/text-to-image',
input: ['prompt' => 'A small red fox curled up in a teacup, soft morning light'],
idempotencyKey: Client::idempotencyKey(),
waitSeconds: 60,
);
if (!Client::isTerminal($task)) {
$task = $client->waitForTerminal($task['taskId']);
}
foreach (Client::readyAssets($task) as $asset) {
echo $asset['url'], "\n";
}// build.gradle.kts
implementation("ai.popnow:popnow-java:0.1.0")import ai.popnow.*;
import java.util.Map;
import java.util.UUID;
public class Quickstart {
public static void main(String[] args) {
PopNowClient client = PopNowClient.builder().apiKeyFromEnvironment().build(); // POPNOW_API_KEY
CreateTaskRequest request = CreateTaskRequest.of("google/nano-banana-2.1/text-to-image",
Map.of("prompt", "A small red fox curled up in a teacup, soft morning light"));
// createTask + waitForTerminal; the key makes a resend return the original task
TaskRecord task = client.run(request, UUID.randomUUID().toString());
System.out.println(task.state());
for (TaskAsset asset : task.assets()) {
asset.url().ifPresent(System.out::println);
}
}
}npm install -g @popnow/cli
export POPNOW_API_KEY="sk-popnow-..."popnow jobs create \
--model google/nano-banana-2.1/text-to-image \
--input-json '{"prompt":"A small red fox curled up in a teacup, soft morning light"}' \
--waitexport POPNOW_API_KEY="sk-popnow-..."curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "google/nano-banana-2.1/text-to-image",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"aspect_ratio": "16:9",
"resolution": "1k",
"output_format": "png"
}
}'Authentication
Send your key as a Bearer token. Keys start with sk-popnow- and can be limited to certain models and IP addresses, with daily, monthly and total spending caps.
API keyscurl https://api.popnow.ai/api/v1/models \
-H "Authorization: Bearer $POPNOW_API_KEY"All libraries and tools
Everything is on GitHub under github.com/popnow-ai.
Languages
- popnow-go
Go client with typed requests, waiting helpers and iterators.
go get github.com/popnow-ai/popnow-goGitHubpkg.go.dev
Tools and plugins
- popnow-bot
Self-hosted Telegram and Discord bot for images, videos and video effects, with spend limits.
GitHubDocker Hub
For AI agents and coding assistants
- MCP server
Add https://api.popnow.ai/mcp to Claude, ChatGPT, Cursor or any MCP client and let it generate images and video for you.
https://api.popnow.ai/mcp - Agent Skills
Skills for Claude Code, Codex and other coding agents that know the API, the models and the prices.
SKILL.md - llms.txt
A plain-text map of the API and docs for language models to read.
/llms.txt - OpenAPI spec
The full API as an OpenAPI file, for code generators and API clients.
openapi.yaml
Built in for production
- Quotes
Price a request without running it, then pass the quote to create the task.
POST /jobs/quote - Idempotency keys
Retry safely: the same key returns the original task instead of charging twice.
Idempotency-Key - Signed webhooks
Get the finished task posted to your server, signed so you can verify it came from us.
X-Webhook-Signature - Rate limits
Up to 1,000 requests per 10 seconds per account; a 429 tells you how long to wait.
429 · Retry-After
Start building in minutes
One key for every model, a USD balance you top up when you need to, and an exact price before every run.