CashLink Public Image Space API v2
Overview
Base URL: https://linkincash.cc/api/v2/image-space. Accounts are anonymous and cookie-free. There is no free quota: every source-file byte is charged to purchased capacity. Images have no time-based expiry, although deletion, malware, policy enforcement, or system data-erasure rules can end storage. The per-file limit is 20 MB.
Successful JSON uses the data, links, and meta envelope. Errors use application/problem+json. Treat account, recovery, order, and upload tokens as passwords.
Account
Create an account with POST /accounts and a 16–200 character Idempotency-Key. The climg_ bearer token and climgr_ recovery code are returned only on the first successful creation.
curl -X POST 'https://linkincash.cc/api/v2/image-space/accounts' \
-H 'Accept: application/json' -H 'Idempotency-Key: REPLACE_WITH_RANDOM_UUID'
Use the token with GET /account. POST /account/token-rotations immediately invalidates both old credentials. Recover through POST /accounts/recover with {"recovery_code":"climgr_..."}; recovery codes are single use.
Capacity payments
The Image Space API is storage-only. The compatibility field quota_balance_bytes continues to mean add-on storage; the API does not offer and explicitly rejects quota_type=traffic, which is only for daily browser image-upload overage on /images.
Request GET /quota/quote?units=1, then create POST /payment-orders with units, quote_token, a twice-confirmed mainnet BCH refund_address, terms_version: "2026-08-08", terms_accepted: true, and an Idempotency-Key. The response exposes a clapi_ order token once, allowing payment observers to access the order, QR, refunds, and SSE without account-wide privileges.
curl -X POST 'https://linkincash.cc/api/v2/image-space/payment-orders' \
-H 'Authorization: Bearer climg_REPLACE' \
-H 'Idempotency-Key: REPLACE_WITH_RANDOM_UUID' -H 'Content-Type: application/json' \
-d '{"units":1,"quote_token":"REPLACE","refund_address":"bitcoincash:REPLACE","refund_address_confirmation":"bitcoincash:REPLACE","terms_version":"2026-08-08","terms_accepted":true}'
After persisting the order token, activate with POST /payment-orders/{order}/activate and {"saved_order_token":true}. Read order endpoints with Authorization: Bearer clapi_.... SSE supports Last-Event-ID.
Direct upload and image management
Send multipart image to POST /images; every mutation requires Idempotency-Key. A 202 response includes the public code, source SHA-256, metadata, and page/direct/thumbnail/preview URLs.
curl -X POST 'https://linkincash.cc/api/v2/image-space/images' \
-H 'Authorization: Bearer climg_REPLACE' -H 'Idempotency-Key: REPLACE_WITH_RANDOM_UUID' \
-F 'title=Example' -F 'tags=api,test' -F '[email protected]'
Manage content with GET /images, GET|PATCH|DELETE /images/{publicCode}, and POST /images/{publicCode}/rescans. Cross-account access and invalid or revoked tokens always return 404.
Resumable upload
Create POST /upload-sessions with name, mime, and size, then save the returned upload_token. Each PATCH /upload-sessions/{session} carries Upload-Token, the current Upload-Offset, the binary chunk, and lowercase hexadecimal Upload-Chunk-SHA256. Finish with POST /upload-sessions/{session}/complete or cancel with DELETE. Offset or checksum conflicts return 409; cancellation and terminal failures release the reservation.
See the complete OpenAPI YAML.