DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to call the open API to generate images or videos from a script with Printfilm

Use the /api/v1 endpoints with a Bearer token or X-Api-Key header to run generation from your own code.

Short answer: Start PRINTFILM and confirm the API is up with http://localhost:8000/api/health; then 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. All steps.

  • Content
  • Advanced
  • 90 minutes
  • From the README
  • Any agent

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

  1. Start PRINTFILM and confirm the API is up with http://localhost:8000/api/health.
  2. Open the API docs at http://localhost:8000/docs and find the /api/v1 image and video generation routes.
  3. 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.
  4. Send a request to the image or video route with either an Authorization: Bearer <token> header or an X-Api-Key: <key> header. (inferred, check the README)
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer