What is Pruna

Pruna is a model lab that builds specialized fast image and video models, and serves them through one API. You get production-quality generations in seconds (some in under one second) for a fraction of the usual cost, which means more iterations during a 72-hour build. You don't have to take our word for it: see how Pruna's models rank on Design Arena, the crowdsourced leaderboard where people vote blind on image and video outputs.

For this hackathon, Pruna is a tech partner and covers your usage with shared credits. The best submission built with Pruna models wins $500 worth of Pruna credits. Models you can build with:

Use case Example models Good for
Image generation p-image-ideogram: photoreal images with legible text and precise layouts · p-image: the fastest and cheapest, under a second Posters, product visuals, UI assets, quick drafts
Image editing p-image-edit: edit or combine 1–5 images from a prompt · p-image-try-on: dress a person in clothes from photos · p-image-upscale: upscale and sharpen Product shots, fashion and e-commerce, background swaps
Video generation p-video-2-pro: cinematic clips from text or start/end frames, with generated audio · p-video-2-pro-reference (new): keeps a subject consistent from image, video or audio references · p-video-2: polished clips up to 1080p · p-video-avatar: talking avatar from a portrait and a script Ads, explainers, storytelling, spokesperson videos
Video editing p-video-edit: change a video with a text instruction · p-video-replace: swap a person, outfit or product in footage · p-video-animate: make a photo move like a template clip Restyling, remixing user content, product placement

The full model list and the model guide in the API docs show every endpoint with its parameters and price. Switching models means changing one line in your request. For ready-to-run code examples per model, see the Pruna endpoints docs.

Get started in 2 minutes

Every team uses the same shared hackathon API key, so there is no sign-up and no billing setup. Send it in the apikey header of every request to https://api.pruna.ai/v1.

Hackathon API key: <SHARED KEY — added here on Fri 6 Nov>

Building with a coding agent? Install Pruna's agent skills so Claude Code, Cursor or your favorite agent knows every model and how to call it. Set PRUNA_API_KEY, run npx skills add PrunaAI/pruna-skills@pruna -y, then describe what you want in plain language. See Pruna Skills on GitHub.

  1. Store the key as an environment variable: export PRUNA_API_KEY="<key>".
  2. Pick a model and put its ID in the Model header (for example p-image, p-image-edit, p-video).
  3. POST your input to /v1/predictions, then download the file from the generation_url in the response.

Generate an image (curl)

curl -X POST <https://api.pruna.ai/v1/predictions> \
  -H "apikey: $PRUNA_API_KEY" \
  -H "Model: p-image" \
  -H "Try-Sync: true" \
  -H "Content-Type: application/json" \
  -d '{"input": {"prompt": "A cozy Finnish sauna by a lake at dusk, photorealistic", "aspect_ratio": "16:9"}}'

Same thing in Python

import os, requests

KEY = os.environ["PRUNA_API_KEY"]
r = requests.post(
    "<https://api.pruna.ai/v1/predictions>",
    headers={"apikey": KEY, "Model": "p-image", "Try-Sync": "true"},
    json={"input": {"prompt": "A cozy Finnish sauna by a lake at dusk", "aspect_ratio": "16:9"}},
)
url = r.json()["generation_url"]
open("out.jpg", "wb").write(requests.get(url, headers={"apikey": KEY}).content)

Editing images: upload each input with POST /v1/files (form field content), then pass the returned file URLs in input.images with Model: p-image-edit. It accepts 1 to 5 images.

Video and other slow jobs: leave out Try-Sync. The response gives a get_url; poll it until status is succeeded, then download from generation_url. Sync mode waits at most 60 seconds, so use it only for fast image models.

Full walkthrough with upload and async examples: API Quickstart.

Playing fair with the shared key