Appearance
IPFS
Pin images to IPFS through Pinata and list files you previously uploaded. Related: Collections (image metadata values are typically ipfs://… URIs from this endpoint).
Uploads are images only (PNG, JPEG, WebP, GIF, max 5MB). The API compresses each file to WebP (≤1MB) before pinning. Each successful upload costs 1 credit, including repeat uploads and sandbox API keys. Validation failures are free; upload failures refund the debit. Reusing a gallery URI and editing names or tags are free.
The gallery catalog is per Mintea user. Pins made before the catalog existed are on Pinata but will not appear in GET /v1/ipfs/files.
TIP
Requires PINATA_JWT on the API. Browser sessions use the mintea_session cookie; scripts use Authorization: Bearer mtk_… / mts_….
| Method | Path | Auth | Credits | Description |
|---|---|---|---|---|
POST | /v1/ipfs/pin | Yes | 1 | Pin a single image (multipart field file) |
GET | /v1/ipfs/files | Yes | — | List your pinned images (cursor, limit, q) |
| PATCH | /v1/ipfs/files/bulk | Yes | — | Update gallery names and tags |
Pin
POST /v1/ipfs/pin with multipart/form-data and field file.
Success (catalog write succeeded):
json
{
"uri": "ipfs://bafy…",
"cid": "bafy…",
"id": "clx…",
"name": "photo.webp",
"tags": [],
"mimeType": "image/webp",
"sizeBytes": 184320,
"createdAt": "2026-09-18T19:00:00.000Z"
}If Pinata succeeds but the catalog write fails, the response is still { "uri", "cid" } so minting is not blocked.
Errors: missing file or invalid type → 400; larger than 5MB → 400; Pinata unset/unavailable → 503; insufficient credits → 402 without contacting Pinata.
bash
curl -b cookies.txt -X POST https://api.mintea.tech/v1/ipfs/pin \
-F 'file=@./cover.png'List
GET /v1/ipfs/files?cursor=&limit=&q=
limit: 1–48, default 24cursor: opaque token from the previous pageq: optional case-insensitive filter on filename or CID, or an exact normalized tag
json
{
"page": [
{
"id": "clx…",
"cid": "bafy…",
"uri": "ipfs://bafy…",
"name": "photo.webp",
"tags": [],
"mimeType": "image/webp",
"sizeBytes": 184320,
"createdAt": "2026-09-18T19:00:00.000Z"
}
],
"nextCursor": null,
"total": 1
}Only the authenticated user’s files are returned.
Bulk edits
PATCH /v1/ipfs/files/bulk accepts 1–48 unique file IDs:
json
{
"updates": [
{ "id": "clx…", "name": "Summer cover", "addTags": ["summer"], "removeTags": ["draft"] }
]
}Returns { "files": [...] } with updated catalog entries. Names are trimmed and must have 1–128 characters. Tags are trimmed, lowercased, and deduplicated; each tag has 1–32 characters and each image can have at most 20 tags. A tag cannot be added and removed in the same update. Every update must contain an edit. Invalid batches return 400; missing or inaccessible files return 404. All edits commit together. Image bytes, CIDs, URIs, and minted metadata stay unchanged. Repeat uploads preserve existing catalog names and tags.