- functions
- 2
- access
- Your key
- tasks
- 1
Use PiAPI on Longwave
- Download Longwave or open app.longwave.run.
- Add your PiAPI API key once in Longwave settings. Calls run on your PiAPI account at PiAPI's price.
- Ask for the result in any thread, for example: “Generate an image from a campaign brief”. The agent picks the PiAPI function and calls it.
Use PiAPI in Claude Code, Codex, Cursor or ChatGPT
Add the Longwave MCP server once. It carries 2,593 functions across 103 tools, including PiAPI, and asks you to sign in on first use.
Why call PiAPI through Longwave
- Your PiAPI key is stored once, encrypted, and used by every harness and device you use.
- One MCP server for 103 tools, so your agent setup does not grow a key and a server per vendor.
- Spending limits per key and per account, checked before a paid call is made.
- Each call is recorded with the provider, the cost and the result, and can be read again from another device.
PiAPI functions
Image generation 1
| Function | Price |
|---|---|
| Generate an image from text Accepts a text prompt and returns a receipt for a FLUX Schnell image generation request. piapi.image.submit | See vendor pricing. |
PiAPI 1
| Function | Price |
|---|---|
| Get a PiAPI task result Accepts a task ID and returns the task status and output references. piapi.task.get | Task status and result retrieval; generation is billed at submission, with no separate published polling fee. |
Prices are PiAPI's published rates. Source: PiAPI pricing.
Use cases
- Generate an image from a campaign brief Submit an image generation task with the supported inputs.
- Read the result of an image generation task Retrieve task status and available output using its identifier.
- Create an image variation for review Submit another image task using the revised prompt.