PopNowAPI Docs
Get started
Main content

SDKs, CLI and open-source tools

Official open-source PopNow SDKs for Python, JavaScript, Go, PHP and Java, a CLI, the MCP stdio bridge, Agent Skills, a server-side proxy, a chat bot and the Blender, ComfyUI and n8n integrations, with install commands from PyPI, npm, Packagist, Maven Central and the Comfy Registry.

Everything PopNow publishes for developers is open source under the popnow-ai organization on GitHub, MIT-licensed. The SDKs wrap the same REST API these docs describe, so every page here still applies: same model IDs, same input fields, same API USD balance.

The packages are published on PyPI, npm, Packagist, Maven Central and the Comfy Registry; install them with the commands on this page. You can also call the API directly over HTTP using curl, fetch or requests.

At a glance

RepositoryWhat it isInstall
popnow-pythonPython SDK, sync and asyncpip install popnow
popnow-jsJavaScript and TypeScript SDK for Node.js 18+, Deno, Bun and edge runtimesnpm install popnow
popnow-clipopnow command-line toolnpm install -g @popnow/cli
popnow-goGo clientgo get github.com/popnow-ai/popnow-go
popnow-phpPHP clientcomposer require popnow/popnow
popnow-javaJava client for Java 17+, Kotlin and other JVM languagesai.popnow:popnow-java on Maven Central
popnow-api-mcpClient configs and a stdio bridge for the developer MCPNothing to install; bridge: npx -y @popnow/mcp
popnow-skillsAgent Skills for Claude Code, Codex and other agentsClaude Code plugin marketplace
popnow-apiOpenAPI file, curl, Python and Node examples, an n8n workflowClone or copy
popnow-proxyServer-side proxy so browser and mobile apps can call the API without exposing your keynpm install @popnow/proxy
popnow-botSelf-hosted Telegram and Discord bot for images, videos and video effectsDocker
popnow-blenderSource of the Blender add-onZip from popnow.ai/api/blender
popnow-comfyuiComfyUI custom node packComfyUI Manager, or comfy node install popnow-comfyui
n8n-nodes-popnown8n community node (self-hosted n8n)Settings > Community Nodes: n8n-nodes-popnow
langchain-popnowLangChain and LangGraph tools for images, video, music and speechpip install -U langchain-popnow
popnow-ai-sdk-providerVercel AI SDK provider for images, speech, transcription, chat and agent toolsnpm install @popnow/ai-sdk-provider ai zod

The SDKs and CLI use an API key from the API console. Set it in POPNOW_API_KEY, which they read from the environment:

export POPNOW_API_KEY="sk-popnow-..."

Python SDK

popnow-python has a sync client (PopNow) and an async one (AsyncPopNow), typed results, automatic Idempotency-Key headers, retries on 429 and 503, file uploads, the asset library and webhook signature checks. It needs Python 3.9 or newer and depends only on httpx.

pip install popnow
Python (popnow SDK)
from popnow import PopNow

client = PopNow()  # reads POPNOW_API_KEY

task = client.images.generate(
    model="alibaba/z-image-turbo/text-to-image",
    prompt="A small red fox curled up in a teacup, soft morning light",
)
print(task.state, task.cost, "USD", task.urls[0])

images.generate creates the task, waits for it and raises TaskFailedError unless it succeeds. The lower-level client.jobs.quote(), create(), get() and wait() map one to one onto the task endpoints.

JavaScript and TypeScript SDK

popnow-js has no runtime dependencies and uses the global fetch, so it runs on Node.js 18+, Deno, Bun, Cloudflare Workers and other edge runtimes. It ships ESM and CommonJS builds with type definitions.

npm install popnow

On Deno and Bun it is also on JSR: deno add jsr:@popnow/popnow or npx jsr add @popnow/popnow.

JavaScript (popnow SDK)
import { PopNow } from 'popnow';

const popnow = new PopNow(); // reads POPNOW_API_KEY

const task = await popnow.jobs.createAndWait({
  model: 'alibaba/z-image-turbo/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);

createAndWait sends an Idempotency-Key for you and polls until the task is final. jobs.quote, jobs.create and jobs.wait are there when you want to price first or wait somewhere else.

Command line

popnow-cli installs a popnow command for scripts, CI jobs and quick tests from a terminal. It needs Node.js 22.12 or newer:

npm install -g @popnow/cli
popnow --help

To run it once without installing: npx @popnow/cli status.

Go and PHP

popnow-go is a regular Go module (Go 1.23+):

go get github.com/popnow-ai/popnow-go

popnow-php (PHP 8.1+) is popnow/popnow on Packagist:

composer require popnow/popnow

Java

popnow-java is a client for Java 17+, Kotlin and other JVM languages, published on Maven Central as ai.popnow:popnow-java. Its only dependency is Jackson databind; HTTP goes through the JDK's own HttpClient.

pom.xml
<dependency>
  <groupId>ai.popnow</groupId>
  <artifactId>popnow-java</artifactId>
  <version>0.1.0</version>
</dependency>
build.gradle.kts
dependencies {
    implementation("ai.popnow:popnow-java:0.1.0")
}
Java (popnow-java)
import ai.popnow.*;
import java.util.Map;
import java.util.UUID;

PopNowClient client = PopNowClient.builder().apiKeyFromEnvironment().build(); // POPNOW_API_KEY

CreateTaskRequest request = CreateTaskRequest.of("alibaba/z-image-turbo/text-to-image",
        Map.of("prompt", "A small red fox curled up in a teacup, soft morning light"));

TaskRecord task = client.run(request, UUID.randomUUID().toString()); // createTask + waitForTerminal
System.out.println(task.state() + " for " + task.cost() + " USD");

run creates the task under the Idempotency-Key you pass and waits until it is final; createTask and waitForTerminal are there when you want the two steps apart.

MCP and Agent Skills

The developer MCP needs no package: add https://api.popnow.ai/api/v1/mcp with your API key to Claude Code, Cursor, Codex, VS Code or any other MCP client. popnow-api-mcp holds a small stdio bridge for clients that can only start local servers. The bridge is on npm as @popnow/mcp, so npx -y @popnow/mcp runs it with no install step; set POPNOW_MCP_URL to the developer endpoint.

popnow-skills teaches coding agents to make videos, images, music and voiceovers with the REST API, and to look up the API reference. In Claude Code:

/plugin marketplace add popnow-ai/popnow-skills
/plugin install popnow@popnow-skills

The README covers Codex and other agents. For ready-made styles such as launch videos, slide decks and websites, see Agent skills.

Examples and integrations

  • popnow-api holds the OpenAPI file, runnable curl, Python and Node.js examples and an importable n8n workflow. Point a code generator at the OpenAPI file if you need a client in another language.
  • popnow-blender is the source of the Blender add-on. To install it, download the zip from popnow.ai/api/blender; the repository can also build the same zip.
  • popnow-comfyui is a ComfyUI node pack on the Comfy Registry: one node per model, plus PopNow Generate and PopNow LoRA. In ComfyUI Manager, open Custom Nodes Manager, search for PopNow and click Install, or run comfy node install popnow-comfyui. ComfyUI has the full steps and the single-file node, if you prefer to inspect a single source file.
  • n8n-nodes-popnow is an n8n community node on npm for self-hosted n8n. Open Settings > Community Nodes > Install and enter n8n-nodes-popnow, or install it from a shell and restart n8n. It is not a verified node yet, so n8n Cloud cannot install it; the HTTP Request workflow needs no install and works there too.
  • popnow-proxy is a small server-side route for Next.js, Express and other fetch runtimes. A browser, mobile or desktop app calls your server, and the proxy adds the API key there, so the key never ships in the client. It needs Node.js 22.12 or newer.
  • popnow-bot is a Telegram and Discord bot you run yourself with Docker: images, videos and video effects in a chat, with a price check before paid runs and daily spend limits. Clone the repository and start it with docker compose up -d --build, or pull the prebuilt popnow/popnow-bot image from Docker Hub.
# n8n community node, from a shell on self-hosted n8n
mkdir -p ~/.n8n/nodes && cd ~/.n8n/nodes
npm install n8n-nodes-popnow
# server-side proxy
npm install @popnow/proxy

Is there an official PopNow SDK?

Yes. The Python and JavaScript SDKs, the CLI and the Go, PHP and Java clients on this page are maintained by PopNow and open source under github.com/popnow-ai.

Are the SDKs on npm or PyPI?

Yes. pip install popnow installs the Python SDK from PyPI and npm install popnow the JavaScript SDK from npm. The CLI is @popnow/cli on npm, the PHP client is popnow/popnow on Packagist, the Java client is ai.popnow:popnow-java on Maven Central, and the ComfyUI pack is popnow-comfyui on the Comfy Registry. Each repository's CHANGELOG.md lists its releases.

Should I use an SDK or call the REST API directly?

Either approach works. The SDKs add retries, idempotency keys, polling and typed results. Direct HTTP calls require no PopNow SDK; use the HTTP examples throughout these docs.

Do the SDKs cost anything?

No. The code is free under the MIT license; API generations spend your PopNow balance, in USD, at the same model price rate as the website. Add funds in API billing.

Where do I report a bug?

Open an issue in the repository it belongs to. For a security problem, follow the SECURITY.md file in that repository instead of opening a public issue.

On this page