List library items
const url = 'https://api.harperharbor.com/open/v1/image/list?scope=all&kind=image&pageNum=1&pageSize=50&sort=newest';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.harperharbor.com/open/v1/image/list?scope=all&kind=image&pageNum=1&pageSize=50&sort=newest' \ --header 'Authorization: Bearer <token>'List locally hosted, account-owned stored media with pagination, folder and kind filters, optional filename search and ordering. External references are excluded. Harbor returns capabilities and has no moderationState field. Returns the account-fixed public UID libraryPrefix, including for an empty library; overwrite and relativePaths capabilities are true. fileName contains the authored relative path for named resources.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”role requires roleId; folder requires folderId; unfiled = items in no folder.
Required when scope=role.
Required when scope=folder.
Media kind filter. Absent = images only; all = no filter.
1-based page; <1 becomes 1.
<1 or >100 becomes 50.
Harbor capability extension: literal filename substring search across the entire selected collection. Use only when capabilities.search is true.
Harbor capability extension: order before pagination; use a value advertised by capabilities.sorts.
Responses
Section titled “Responses”Page.
object
object
Total items in the scope.
object
Attributed card id or empty.
Absent for legacy rows.
0 for legacy rows.
RFC3339; absent when unknown.
File name for items stored under the library prefix; absent for older items with generated URLs.
Max items per account (10000).
Bytes used by items with byte accounting (0 if unavailable).
Max bytes per account (524288000).
Account-fixed library URL prefix without a trailing slash. HarperHarbor uses https://
Optional provider-reported resource capabilities. Absence means unknown, not unrestricted.
object
Accepted MIME types.
Whether uploading to the same relative path replaces content while preserving its URL.
Supports relativePath uploads preserving authored folder names and directory structure. Do not flatten directories for providers lacking this capability.
Renaming or moving a folder or file moves its path and URL; see POST /open/v1/image/move.
Example
{ "code": 0, "data": { "imageList": [ { "kind": "image" } ] }}invalid_param — unknown scope/kind or missing roleId/folderId for the scope.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}unauthorized.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}generic_error.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}