Getting Started
API reference
Every endpoint, in one place.
Base URL: https://app.piernode.com
Every endpoint takes Authorization: Bearer pn_.... See
Authentication.
Generation
| Method | Path | Description |
|---|---|---|
POST | /api/v1/images/generations | Text to image |
POST | /api/v1/images/transformations | Image to image |
POST | /api/v1/videos/generations | Text to video |
POST | /api/v1/videos/transformations | Image to video |
All four return a task immediately and reserve the cost. Poll for the result.
Tasks
| Method | Path | Description |
|---|---|---|
GET | /api/v1/tasks/\{taskId\} | Poll a task. Not billed. |
POST | /api/v1/tasks/\{taskId\}/cancel | Cancel a queued task. |
Uploads
| Method | Path | Description |
|---|---|---|
POST | /api/v1/uploads | Reserve an upload, get a URL to PUT to. |
POST | /api/v1/uploads/\{assetId\}/complete | Verify the bytes and make the upload usable. |
GET | /api/v1/uploads/\{assetId\} | Read an upload's state. |
Not billed. See Uploading an image.
Account
| Method | Path | Description |
|---|---|---|
GET | /api/v1/me | Your account id, balance and currency. |
curl https://app.piernode.com/api/v1/me \
-H "Authorization: Bearer $PIERNODE_API_KEY"{
"id": "the-account-id",
"balance": "100.000000",
"currency": "USD"
}Conventions
Shared by every endpoint:
- Request bodies are JSON, limited to 64 KB. Unknown fields are ignored.
- Amounts are exact decimal strings, never floating-point numbers.
- Timestamps are ISO 8601 in UTC.
- Enum values are lowercase (
720p,hd,16:9). - Errors carry a status code and a human-readable message — see Errors.
- Generation requests are limited to 60 per minute per account.