PlatformIntegrations

Developer workspace / Integrations

Your next integration.

Choose a model, tailor a request, and take working code into your application.

API documentation
02

Connect

example.pyPython · server
import os
import time
import httpx

headers = {"Authorization": f"Bearer {os.environ['POWERCHAMPION_API_KEY']}"}
base = "https://b300.powerchampion.ai/v1"

job = httpx.post(
    f"{base}/videos",
    headers=headers,
    json={"model": "wan2.2-ti2v-5b-720p", "prompt": "Explain how a language model works in three sentences.", "seconds": 5},
    timeout=60.0,
)
job.raise_for_status()
job_id = job.json()["id"]

while True:
    state = httpx.get(f"{base}/videos/{job_id}", headers=headers, timeout=60.0).json()["status"]
    if state in ("succeeded", "failed", "cancelled", "expired"):
        break
    time.sleep(5)

if state != "succeeded":
    raise RuntimeError(f"Video job ended with status {state}")

video = httpx.get(f"{base}/videos/{job_id}/content", headers=headers, timeout=300.0)
video.raise_for_status()
with open("video.mp4", "wb") as file:
    file.write(video.content)

Before you run

  1. Install the dependency: python -m pip install httpx
  2. Set POWERCHAMPION_API_KEY as an environment variable on your server.
  3. Review the inputs, save the example, and run it in your own environment.

Keep API keys on your server; do not embed them in browser code or public repositories.

Base URLhttps://b300.powerchampion.ai/v1
Model IDwan2.2-ti2v-5b-720p

01 / ACCESS

Need an API key?

Request access from the team and fund your prepaid balance.

02 / TROUBLESHOOT

Request not working?

401: check your key. 402: check credit. 429: respect Retry-After. 503: check availability and retry later.

Service status
03 / SCALE

A dedicated deployment?

Plan GPU capacity, model hosting, and deployment requirements with the team.

Explore infrastructure