Credentials. API credentials and TokenFree keys grant access to paid generation, so store them in environment variables and never place them in prompts or committed files.
Who it is forA developer or automation agent that needs to generate images or videos as one step in a larger workflow.
The problemGeneration through the web interface does not fit into scripts, batch jobs, or other tools.
The outcomeA script or agent that submits image or video generation through PRINTFILM and receives results from the API.
What you need first
- Docker Desktop, or Docker Engine with Compose
- A TokenFree API key (sk-...), or set ARK_MOCK=true to try the interface without real generation
- Ports 8000, 8080, and 8081 free on the host machine
Steps
- Start PRINTFILM and confirm the API is up with
http://localhost:8000/api/health. - Open the API docs at http://localhost:8000/docs and find the /api/v1 image and video generation routes.
- Obtain an API credential for your account, since the README names Bearer tokens and X-Api-Key headers but does not describe how to create one.
- Send a request to the image or video route with either an
Authorization: Bearer <token>header or anX-Api-Key: <key>header. (inferred, check the README) - Poll the task status through the API until the output is ready, then save the returned file.
Prompt for your agent
Using the PRINTFILM API at http://localhost:8000/api/v1 and the route listed at http://localhost:8000/docs, submit one image generation request with the prompt <prompt> using the credential in <env var>. Return the task ID and the final result, and verify the response status is successful.
Caveat. The README documents the /api/v1 paths and auth methods only in summary form, so confirm the exact request format in the /docs page before writing code against it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for yi1108/printfilm and "Call the open API to generate images or videos from a script"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer