Menu

Storage

Uploads, stored content and its copies, pins, gateway domains, path maps, names.

OperationMethod and path
Whether the caller's storage is unpaidGET /ipfs/account/unpaid
Parse a CIDGET /ipfs/cid/{cid}
One page of the caller's contentGET /ipfs/content
One of the caller's stored contents and its copiesGET /ipfs/content/{cid}
Delete one of the caller's stored contentsDELETE /ipfs/content/{cid}
Raise or lower the copies of one of the caller's stored contentsPOST /ipfs/content/{cid}/copies
The caller's attached hostnamesGET /ipfs/domains
Attach a hostname of the caller, or a free name, to pinned contentPOST /ipfs/domains
Detach an attached hostnameDELETE /ipfs/domains/{id}
One of the caller's gateway domainsGET /ipfs/domains/{id}
The pins a gateway domain serves besides its rootGET /ipfs/domains/{id}/pins
Attach and detach pins served by a gateway domainPOST /ipfs/domains/{id}/pins
Point an attached hostname at other contentPOST /ipfs/domains/{id}/retarget
Switch detailed statistics on for one of the caller's sitesPOST /ipfs/domains/{id}/stats/detail
Switch detailed statistics off for one of the caller's sitesDELETE /ipfs/domains/{id}/stats/detail
The delegation grants the caller gave and was givenGET /ipfs/grants
Let another account manage the gateway domains under one of the caller's namesPOST /ipfs/grants
End a grant (its owner or its grantee)DELETE /ipfs/grants/{id}
The caller's IPNS namesGET /ipfs/names
Create an IPNS name, optionally served as a gateway domainPOST /ipfs/names
One of the caller's IPNS names, with the domains following itGET /ipfs/names/{id}
Retire an IPNS name (final)DELETE /ipfs/names/{id}
Point an IPNS name at a CIDPUT /ipfs/names/{id}/target
The path maps of the caller's gateway domainsGET /ipfs/path-maps
Serve one of the caller's pins under a path of one of its gateway domainsPOST /ipfs/path-maps
Retire a path map (desired absent)DELETE /ipfs/path-maps/{id}
Set a path map's desired statePOST /ipfs/path-maps/{id}/desired
The caller's pinsGET /ipfs/pins
Pin one of the caller's stored contents by its cidPOST /ipfs/pins
One of the caller's pinsGET /ipfs/pins/{requestid}
Retire one of the caller's pinsDELETE /ipfs/pins/{requestid}
The detailed statistics of one of the caller's sitesGET /ipfs/stats/detail
Download a site's or pin's statisticsGET /ipfs/stats/export
The top pages or the 404 list of a site or pin on one dayGET /ipfs/stats/paths
Which of the caller's sites have detailed statistics onGET /ipfs/stats/settings
The caller's sites, pins and contents with trafficGET /ipfs/stats/subjects
The daily traffic summary of a site or pinGET /ipfs/stats/summary
Today's running counters of a site or pinGET /ipfs/stats/today
Switch storage on for the caller, or acknowledge the storage location noticePOST /ipfs/storage/enable
The storage location notice and where the caller stands with itGET /ipfs/storage/location-notice
Open an upload sessionPOST /ipfs/uploads
The caller's upload sessions, newest firstGET /ipfs/uploads
One of the caller's upload sessionsGET /ipfs/uploads/{id}
Abort one of the caller's upload sessionsDELETE /ipfs/uploads/{id}
Complete one of the caller's upload sessionsPOST /ipfs/uploads/{id}/complete
The caller's metered storage usageGET /ipfs/usage

Whether the caller's storage is unpaid#

GET /ipfs/account/unpaid · operation getIpfsAccountUnpaid

Whether the caller's storage has unpaid charges: unpaid, unpaid_since, stage (paid, grace, suspended, deleting, deleted), grace_hours, grace_until, grace_over, suspends_at (when serving stops unless the balance is topped up; never sooner than the customer was told), suspended, retention_until, delete_after, teardown (how far the removal of the content got). While unpaid, creating anything in storage is refused 402 account-unpaid: top up. At suspends_at the pins and domains stop being served while everything stored is kept; the next billing that finds the account paid restores them. Content is removed only after the retention period (retention_until, delete_after). Not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedno

Answer 200 (IpfsUnpaidState): the result

  • user_id, string, required
  • grace_until, string or null — when the serving of the account is suspended unless it pays; null until the notices it waits for took effect
  • notified_at, string or null
  • suspended_at, string or null
  • grace_hours_override, integer or null — a longer grace the account was given; null when none
  • billing_starts_at, string or null — nothing is charged to the account before this instant
  • notice_at, string or null — when the notice of the unpaid storage took effect: the grace runs from it; null until then
  • grace_over, boolean
  • unpaid, boolean, required — true while an hourly storage charge stays refused for want of credits: the account creates nothing new
  • teardown, object or null — the removal of the content, once it began
    • state, string (one of running, complete)
    • started_at, string or null
    • completed_at, string or null
  • protected, boolean — true while no-action-before is ahead
  • suspends_at, string or null — the effective instant the account's serving is suspended: when it was, once suspended; else grace-until or a later no-action-before; null while paid or until the notice of the unpaid storage took effect
  • unpaid_since, string or null — when the account became unpaid
  • grace_hours, integer, required — the hours of grace the account has from the notice of the unpaid storage
  • delete_after, string or null — when the removal of the content is due; null until the notices it waits for took effect
  • deletion_approved_at, string or null — when the removal of the content was confirmed; null otherwise
  • no_action_before, string or null — no non-payment action touches the account before this instant
  • retention_until, string or null — until when a suspended account keeps its content at the least
  • suspended, boolean — true while the account's pins and domains are not served; everything it stores is kept
  • stage, string, required (one of paid, grace, suspended, deleting, deleted)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/ipfs/account/unpaid' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage status):

$ weird storage status

MCP: weird_storage_status.

Parse a CID#

GET /ipfs/cid/{cid} · operation inspectIpfsCid

What a CID says: a CIDv0 (Qm...) or a CIDv1 (base32, base36, base58btc), its version, codec, multihash and canonical CIDv1 base32 spelling. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
cidpathstringyes

Answer 200 (IpfsCidInfo): the result

  • hash_code, integer
  • valid, boolean, required
  • codec, integer
  • codec_name, string or null
  • cid_v1, string — the canonical CIDv1 base32 spelling
  • digest_bytes, integer
  • version, integer
  • digest_hex, string
  • cid, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (not a CID)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/ipfs/cid/{cid}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage inspect):

$ weird storage inspect <cid>

MCP: weird_storage_cid_inspect.

One page of the caller's content#

GET /ipfs/content · operation listIpfsContent

content (each row with id, session_id, cid, name, content_type, size_bytes, copies, status, created_at, deleted_at, and on an imported row cid_original and imported), total, limit, offset. Filters: status (stored by default, one, a comma list, or all), q (a name containing it, or a CID starting with it; %, _ and a backslash refused), cid (exactly that CID, a CIDv0 Qm... or a CIDv1), limit (default 100, 1..500), offset, order (asc, the default, or desc). Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
statusquerystringnostored (default), a status, a comma list, or all
qquerystringnoa name fragment or a CID prefix
cidquerystringnoexactly that CID (v0 or v1)
limitqueryintegerno1..500 (default 100) (default 100; 1 to 500)
offsetqueryintegernorows to skip (at least 0)
orderquerystringnoasc or desc

Answer 200 (IpfsContentList): the result

  • user_id, string, required
  • status, string, required
  • content, array of values, required
  • total, integer, required — every row that matches, whatever the page
  • limit, integer, required
  • offset, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/content' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage list, weird storage get, weird storage lock list):

$ weird storage list$ weird storage get <cid|content id|name>$ weird storage lock list <cid|content id|name|local path>

MCP: weird_storage_download, weird_storage_content, weird_storage_lock_show, weird_storage_lock_contents.

One of the caller's stored contents and its copies#

GET /ipfs/content/{cid} · operation getIpfsContent

The content is named by its cid (the cid an upload session answers once stored). copies is the number of copies stored now, the count that is billed: it falls when a copy is lost or its removal begins and rises when a new copy is recorded; target is the count once the copies being made are recorded. copy_states lists the copies that are not simply stored (suspect: a first bad reading; lost: no longer served, replaced from another copy at no charge; removing: taken away by a lowering, its removal under way) and copy_jobs the copies being made now (repair: it replaces a lost copy; raise: a copy the caller asked for). Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
cidpathstringyes

Answer 200 (IpfsContent): the result

  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • copy_states, array of objects, required
    • copy_no, integer, required
    • state, string, required — suspect: a first bad reading, still served; lost: no longer served, replaced from another copy; removing: taken away by a lowering, its removal under way (one of suspect, lost, removing)
    • reason, string or null, required
    • since, string or null, required — the first bad reading, or when the removal began
    • lost_at, string or null, required
    • repaired_at, string or null, required
    • replaced_by, integer or null, required — the copy that replaced a lost one
  • id, string, required
  • copy_jobs, array of objects, required — the copies being made now
    • next_at, string or null, required
    • error, string or null, required — why the last run stopped (it is run again); null while it runs
    • id, string, required
    • attempts, integer or null, required
    • replaces_copy_no, integer or null, required — the lost copy a repair replaces
    • copy_no, integer, required — the number the new copy takes
    • kind, string, required — repair: it replaces a lost copy and is never billed; raise: a copy the caller asked for (one of repair, raise)
    • state, string, required (one of active, done, cancelled)
    • created_at, string or null, required
    • provider_id, string or null, required — the storage provider the copy is made at; null until placed
    • finished_at, string or null, required
  • name, string or null, required
  • copies, integer, required — the copies stored now: the stored size billed is size_bytes times copies
  • status, string, required
  • locations, array of objects — where each copy that is kept is; empty in a listing (read one content for it)
    • copy_no, integer, required
    • provider_id, string, required
    • provider, string or null — the storage provider's name
    • country, string or null — the country the storage provider declares (ISO 3166-1 alpha-2; the provider's own statement, not verified); null when it names none
    • eea, boolean, required — whether that country is in the European Economic Area
  • target, integer, required — the copies once the copies being made are recorded
  • created_at, string, required
  • cid, string, required
  • size_bytes, integer, required
  • content_type, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a cid no stored content of the caller has, another customer's alike)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X GET 'https://api.weird.ro/ipfs/content/{cid}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage show, weird storage copies, weird storage delete):

$ weird storage show <cid>$ weird storage copies <cid> <count>$ weird storage delete <cid>

MCP: weird_storage_upload, weird_storage_content, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

Delete one of the caller's stored contents#

DELETE /ipfs/content/{cid} · operation deleteIpfsContent

The content is named by its cid. Nothing may still serve it under a hostname: while a domain of the caller points at it, or a path map under one of the caller's hostnames points at one of its pins, the call is refused 409 content-in-use with those domains and path_maps and changes nothing (retarget or detach the domains, retire the path maps, then delete). When something that is not the caller's still serves it, the refusal is the same with served_elsewhere true (what it is is never named); when domains and path_maps are both empty, contact support. Otherwise the content is deleted: it stops being billed, listed and served at once, every pin of it is retired together with it (pins_retired), and each copy is removed from its storage provider. 200 with status deleted: copies lists the copies whose removal was scheduled. 202 with status deleting: the content is already gone for the caller (not billed, not served) and the remaining copies (removed false) are removed automatically; nothing more is needed. The call is safe to repeat: on content still deleting it continues the delete, on deleted content it answers 404. 409 piece-ids-unknown means the content is gone for the caller but one copy's removal is delayed: while needs_support is false it is retried automatically; once it is true, support completes it and repeating the call does not help. A 502 means nothing was deleted: the content is still stored, with its pins. Cannot be undone. No body. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
cidpathstringyes

Answer 200 (IpfsContentDeleted): the result

  • cid, string, required
  • status, string, required — deleted (200): the removal of every copy is scheduled; deleting (202): the content is no longer billed or served, some copies are still being removed (automatically) (one of deleted, deleting)
  • deleted_at, string or null, required — null while deleting
  • pins_retired, array of strings, required — the ids (requestid) of the caller's pins of the content, retired together with it
  • copies, array of objects, required — deleted: the copies whose removal this call scheduled; deleting: every copy of the content, the ones still to go removed false
    • copy_no, integer, required
    • removed, boolean, required — the removal of the copy is scheduled with its storage provider
    • transaction, string or null, required — the storage provider's reference of the removal, when it gave one

Answer 202 (IpfsContentDeleted): the content is deleting: no longer billed or served, some copies still being removed (automatically)

  • cid, string, required
  • status, string, required — deleted (200): the removal of every copy is scheduled; deleting (202): the content is no longer billed or served, some copies are still being removed (automatically) (one of deleted, deleting)
  • deleted_at, string or null, required — null while deleting
  • pins_retired, array of strings, required — the ids (requestid) of the caller's pins of the content, retired together with it
  • copies, array of objects, required — deleted: the copies whose removal this call scheduled; deleting: every copy of the content, the ones still to go removed false
    • copy_no, integer, required
    • removed, boolean, required — the removal of the copy is scheduled with its storage provider
    • transaction, string or null, required — the storage provider's reference of the removal, when it gave one

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a cid no stored content of the caller has: another customer's, an unknown and a deleted one alike)
409content-in-use, delete-in-progress, piece-ids-unknowncontent-in-use (domains, path_maps: what of the caller's still serves the content; served_elsewhere: something else serves it too, contact support), delete-in-progress (a delete of it is running: wait) or piece-ids-unknown (copy_no, needs_support: the content is no longer billed or served; the removal of that copy is retried automatically, or, needs_support true, completed by support: do not retry)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (the content is still stored, with its pins)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/content/{cid}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage delete):

$ weird storage delete <cid>

MCP: weird_storage_content_delete.

Raise or lower the copies of one of the caller's stored contents#

POST /ipfs/content/{cid}/copies · operation setIpfsContentCopies

copies is the count wanted, at least 2 and at most the maximum offered. The same count as now changes nothing (state unchanged; raising while the copies of an earlier call are still being made, lowering while a removal asked earlier is still under way): the call is safe to repeat. More: the account's credits must cover storing the added copies (402 insufficient-funds otherwise, nothing changed); each new copy is made at a storage provider that holds no copy of the content yet (state raising, the work in copy_jobs); copies, and what is billed, rise as each copy is ready: poll GET /ipfs/content/{cid}. Fewer: never below 2; the copies removed are a doubtful readable copy first, then the ones with the highest copy numbers, or the one copy_no names when lowering by one; each stops being served and billed at once, then is removed (state lowered, removals what each removal did; a failed one is retried automatically). Cost (credit charges in GET /credits/charges): the per_mb_hour credit charge of recurring.ipfs-pin-hourly times size in MB x copies is billed every hour while what it creates exists; the per_mb_served credit charge of recurring.ipfs-pin-hourly is billed per use.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetya repeat is refused or changes nothing: the same copy count as now changes nothing (state unchanged, or raising/lowering while the first change is under way)

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
recurring.ipfs-pin-hourlyper_mb_hourevery hour while it existssize in MB x copiessee the credit charges
recurring.ipfs-pin-hourlyper_mb_servedper use—see the credit charges

Parameters

NameInTypeRequiredDescription
cidpathstringyes

Request body (SetIpfsCopies):

  • copies, integer, required — the count wanted: at least 2, at most the maximum offered (at least 2)
  • copy_no, integer — lowering by one: the copy to take away (a readable copy); absent: a readable copy under suspicion, else the readable copy with the highest number (at least 1)

Answer 200 (IpfsCopiesChange): the result

  • cid, string, required
  • state, string, required — unchanged: the count is the one asked for; raising: the copies asked for are being made; lowered: this call took copies away; lowering: the removal of a copy an earlier call took away is still under way (one of unchanged, raising, lowering, lowered)
  • copies, integer, required — the copies stored now
  • target, integer, required — the copies once the copies being made are recorded
  • readable, array of integers, required — the copy numbers that can be read
  • copy_states, array of objects, required
    • copy_no, integer, required
    • state, string, required — suspect: a first bad reading, still served; lost: no longer served, replaced from another copy; removing: taken away by a lowering, its removal under way (one of suspect, lost, removing)
    • reason, string or null, required
    • since, string or null, required — the first bad reading, or when the removal began
    • lost_at, string or null, required
    • repaired_at, string or null, required
    • replaced_by, integer or null, required — the copy that replaced a lost one
  • copy_jobs, array of objects, required
    • next_at, string or null, required
    • error, string or null, required — why the last run stopped (it is run again); null while it runs
    • id, string, required
    • attempts, integer or null, required
    • replaces_copy_no, integer or null, required — the lost copy a repair replaces
    • copy_no, integer, required — the number the new copy takes
    • kind, string, required — repair: it replaces a lost copy and is never billed; raise: a copy the caller asked for (one of repair, raise)
    • state, string, required (one of active, done, cancelled)
    • created_at, string or null, required
    • provider_id, string or null, required — the storage provider the copy is made at; null until placed
    • finished_at, string or null, required
  • removals, array of objects, required — lowered: what the removal of each copy did; empty otherwise
    • copy_no, integer, required
    • removed, boolean, required
    • transaction, string or null, required — the storage provider's reference of the removal, when it gave one
    • error, string or null, required — the removal failed and is retried automatically
    • waiting, boolean, required — another removal of the content was running: this one is tried again

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field copies: not a positive integer, below 2 or over the most; field copy_no: not a positive integer, or given with anything but a lowering by one)
401unauthorizedunauthorized
402insufficient-fundsinsufficient-funds (balance, estimate), raising
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a cid no stored content of the caller has; content not stored through an upload session)
409copies-at-minimum, copy-change-in-progress, copy-not-readable, not-enough-providerscopy-change-in-progress (copies, copy_jobs, removing, lost, copy_no: a copy is being made, repaired or removed, or another request is changing the copies), not-enough-providers (copies: how many more were asked for; eligible_providers), copy-not-readable (copy_no, readable) or copies-at-minimum (min_copies)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X POST 'https://api.weird.ro/ipfs/content/{cid}/copies' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"copies":2}'

With the CLI (weird storage copies):

$ weird storage copies <cid> <count>

MCP: weird_storage_copies_set.

The caller's attached hostnames#

GET /ipfs/domains · operation listIpfsDomains

Every gateway domain of the caller: the hostname, the origin of the caller's zone holding it (null when the caller no longer holds one), the cid it serves, its content and the node serving it. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Answer 200 (IpfsDomainList): the result

  • domains, array of objects, required
    • hostname, string, required — lowercased, without a trailing dot
    • records, array of objects — on an attach: the records written into the zone
      • name, string, required — a name inside the zone, answered lowercased and dotted
      • type, string, required
      • class, string (default "IN")
      • ttl, integer (1 to 2147483647)
      • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string or null
    • zone, string or null, required — the origin of the caller's zone holding the hostname, dotted; null when the caller no longer holds one
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required — the serving node's hostname

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X GET 'https://api.weird.ro/ipfs/domains' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage domains list, weird storage domains detach, weird storage domains get):

$ weird storage domains list$ weird storage domains detach <hostname|id>$ weird storage domains get <hostname|id>

MCP: weird_storage_domains.

Attach a hostname of the caller, or a free name, to pinned content#

POST /ipfs/domains · operation attachIpfsDomain

The hostname must be at or under the origin of an active zone the caller holds (the most specific such zone is used), or be one of the caller's free names (GET /names: its records are written in the free name's base by the platform, the name is then serving; a name held under an abuse review is refused 409 name-suspended; a delegate never attaches a free name); a hostname in no zone of the caller is refused 404 and nothing is written: holding the active zone proves control. Both parts happen or neither: the gateway domain is created (the serving node is chosen for the caller, so node is refused; name_id makes the domain follow one of the owner's IPNS names, cid then optional; pin_ids attaches the owner's pins at once), then its records are written in the zone: an A record to the serving node and, unless dnslink is false, the DNSLink TXT at _dnslink.<hostname>. A name that already has an A, AAAA or CNAME record (or a TXT at its DNSLink name) is refused 409: an attach never overwrites records. The records written belong to the gateway domain (the record routes refuse to change them, 409 managed-record). as_delegate_of (the owner's account id, owner_user_id of GET /grants): under a domain grant carrying ipfs the caller attaches in the owner's zone, with the owner's content and pins, and the domain is the owner's (delegated); a sensitive domain refuses it 403 delegate-blocked. Charged under the contract dns.manage, to the grant's payer under a delegation. Site rules: a file named _redirects at the root of the attached content (the IPFS Web Redirects File: one rule a line, from to [status]; :name placeholders and a trailing * as :splat; 301 (the default), 302, 303, 307 or 308 redirect; 200 serves another path of the same content under the requested address, so /* /index.html 200 is a single-page application's fallback; 404, 410 or 451 serves a page of the content with that status) applies on the attached hostname, on a free name and on the content's own <cid>.ipfs. address, never on the shared gateway address or under a path map; rules apply only to paths that do not exist, the first match wins and the visitor's query is kept; a rule marked ! is refused; on a free name a redirect to another site is refused 403 external-redirect-refused; at most 64 KiB, 1000 rules and 8 placeholders a rule, and a file that does not parse answers 500 for the paths it would decide; a redirect is not charged as traffic, a rewritten page or a custom error page is charged as the content it serves. A file named _headers at the same root (the static-hosting format: a path pattern at the start of a line, then indented Name: value lines, or ! Name to remove a header) sets response headers on the same addresses, every matching rule in order. Allowed everywhere: Cache-Control, Content-Security-Policy and its Report-Only form, X-Frame-Options, Referrer-Policy, Permissions-Policy, the Cross-Origin Opener, Embedder and Resource policies, Link, X-Robots-Tag, Content-Type, Content-Disposition, Content-Language, Service-Worker-Allowed, Timing-Allow-Origin, Access-Control-Max-Age and custom X- headers; Access-Control-Allow-Origin, -Allow-Methods, -Allow-Headers and -Expose-Headers except on the <cid>.ipfs. address (it keeps its own); Strict-Transport-Security, Access-Control-Allow-Credentials, Clear-Site-Data and Origin-Agent-Cluster on your own hostname only; X-Content-Type-Options stays nosniff; anything else (Set-Cookie, Location, framing headers) is dropped and the rest of the file applies. At most 64 KiB, 500 rules, 32 headers a rule, 2000 characters a line and 8 KiB of headers added to one answer; a file that does not parse answers 500 on that address. Cost (credit charges in GET /credits/charges): the per_request credit charge of dns.manage is taken from the credits before it runs (402 insufficient-funds when they do not cover it: top up, then retry; it is refunded when the operation fails).

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetysend the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
dns.manageper_requestbefore it runs—see the credit charges

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringno1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header idempotent-replay: true; it is not performed or charged a second time.

Request body (AttachIpfsDomain):

  • hostname, string, required — a name inside one of the owner's active zones (the zone origin itself included)
  • cid, string — the cid of one of the owner's stored contents (required unless name_id)
  • name_id, string — an IPNS name of the owner the domain follows
  • pin_ids, array of strings — the owner's present pins served besides the root
  • as_delegate_of, string — the owner's account id, under a domain grant carrying ipfs
  • dnslink, boolean — also write the DNSLink TXT record at _dnslink.<hostname> (default true)

Answer 201 (IpfsDomain): the result

  • hostname, string, required — lowercased, without a trailing dot
  • records, array of objects — on an attach: the records written into the zone
    • name, string, required — a name inside the zone, answered lowercased and dotted
    • type, string, required
    • class, string (default "IN")
    • ttl, integer (1 to 2147483647)
    • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • id, string, required
  • desired, string, required (one of present, absent)
  • updated_at, string or null
  • zone, string or null, required — the origin of the caller's zone holding the hostname, dotted; null when the caller no longer holds one
  • created_at, string, required
  • cid, string, required
  • content_id, string, required
  • node, string, required — the serving node's hostname

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field hostname, cid, name_id, pin_ids, node, dnslink or as_delegate_of; another account's pin); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request)
401unauthorizedunauthorized
402account-unpaid, insufficient-fundsinsufficient-funds (the credits do not cover it: top up with POST /credits/topup, then retry) or account-unpaid (the account's storage charges are unpaid: top up, then retry)
403account-suspended, delegate-blocked, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it), profile-incomplete (complete the profile first: GET /auth/profile says what is missing) or delegate-blocked (a delegate may not do this: the owner must); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (no zone of the owner holds the hostname; an unknown cid; as_delegate_of without a grant carrying ipfs)
409base-full, conflict, domain-limit-reached, domain-pin-limit-reached, name-suspendedconflict (the zone is pending or suspended; the hostname already has records; a present domain already serves the hostname), domain-limit-reached, domain-pin-limit-reached, name-suspended (a free name held under an abuse review) or base-full (the free name's base has no room for its site's records right now); conflict (the same operation is still in progress: retry shortly)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
451content-blocked, hostname-blockedhostname-blocked or content-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503charges-not-published, ledger-unavailable, unavailableunavailable (IPFS storage or DNS hosting is not available now), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/domains' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"<hostname>"}'

With the CLI (weird storage domains attach, weird names publish):

$ weird storage domains attach <hostname> <cid>$ weird names publish <name> [file|folder]

MCP: weird_storage_domain_attach.

Detach an attached hostname#

DELETE /ipfs/domains/{id} · operation detachIpfsDomain

The hostname's A, AAAA and DNSLink TXT records are deleted from the caller's zone, then the domain is retired and stops being served; if retiring fails the records are restored. The hostname may be attached again afterwards. Charged under the contract dns.manage. Cost (credit charges in GET /credits/charges): the per_request credit charge of dns.manage is taken from the credits before it runs (402 insufficient-funds when they do not cover it: top up, then retry; it is refunded when the operation fails).

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetysend the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
dns.manageper_requestbefore it runs—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes
Idempotency-Keyheaderstringno1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header idempotent-replay: true; it is not performed or charged a second time.

Answer 200 (IpfsDomainDetached): the result

  • domain, object, required
    • hostname, string, required — lowercased, without a trailing dot
    • records, array of objects — on an attach: the records written into the zone
      • name, string, required — a name inside the zone, answered lowercased and dotted
      • type, string, required
      • class, string (default "IN")
      • ttl, integer (1 to 2147483647)
      • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string or null
    • zone, string or null, required — the origin of the caller's zone holding the hostname, dotted; null when the caller no longer holds one
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required — the serving node's hostname
  • removed, array of objects, required — the records deleted from the zone
    • name, string, required — a name inside the zone, answered lowercased and dotted
    • type, string, required
    • class, string (default "IN")
    • ttl, integer (1 to 2147483647)
    • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field Idempotency-Key: a malformed key, or one used for a different request)
401unauthorizedunauthorized
402insufficient-fundsinsufficient-funds (the credits do not cover it: top up with POST /credits/topup, then retry)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a domain that is not the caller's, a detached one alike)
409conflictconflict (the same operation is still in progress: retry shortly)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503charges-not-published, ledger-unavailable, unavailableunavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/domains/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

With the CLI (weird storage domains detach):

$ weird storage domains detach <hostname|id>

MCP: weird_storage_domain_detach.

One of the caller's gateway domains#

GET /ipfs/domains/{id} · operation getIpfsDomain

With its dns advice (a, dnslink_host, dnslink) and pin_count; a domain the caller manages under a grant has delegated true. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (IpfsDomainView): the result

  • domain, object, required
    • user_id, string, required
    • hostname, string, required
    • cert_retry_token, string or null, required
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string, required
    • kind, string, required (must be "dnslink")
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required
    • delegated, boolean, required — true when the row is another account's, managed under a delegation grant
    • delegate_id, string or null — the account that created the row for its owner
    • name_id, string or null — the IPNS name the domain follows
    • pin_count, integer — how many pins the domain serves at /ipfs/<cid> besides its root
    • dns, object, required
      • a, string or null, required — the IPv4 of the serving node: the A record of the hostname
      • dnslink_host, string, required — _dnslink.<hostname>
      • dnslink, string, required — the TXT value: dnslink=/ipns/<name> when the domain follows a reported name, else dnslink=/ipfs/<cid>

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/domains/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage domains get):

$ weird storage domains get <hostname|id>

MCP: weird_storage_domains.

The pins a gateway domain serves besides its root#

GET /ipfs/domains/{id}/pins · operation listIpfsDomainPins

Each attached pin is served at https://<hostname>/ipfs/<cid> under the CID it carries and its CIDv0 spelling. pins, total, limit (default 25, at most 100), offset, max (the ceiling in force). Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes
limitqueryintegerno1..100 (default 25) (default 25; 1 to 100)
offsetqueryintegernorows to skip (at least 0)

Answer 200 (IpfsDomainPins): the result

  • domain_id, string, required
  • pins, array of objects, required
    • id, string, required
    • cid, string, required
    • content_id, string, required
    • kind, string, required
    • size_bytes, integer, required
    • created_at, string
    • attached_at, string, required
  • total, integer, required — every pin attached, whatever the page
  • limit, integer, required
  • offset, integer, required
  • max, integer, required — the most pins the domain may serve

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/domains/{id}/pins' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage domains pins):

$ weird storage domains pins <hostname|id>

MCP: weird_storage_domain_pins.

Attach and detach pins served by a gateway domain#

POST /ipfs/domains/{id}/pins · operation updateIpfsDomainPins

add and remove, lists of pin ids, applied whole or not at all: add takes the domain owner's current pins only (400 for anything else), remove always works, an id in both is removed. At most limit pins per domain (409 domain-pin-limit-reached with the limit); a retired domain takes no add (409 domain-retired). Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (IpfsDomainPinsDelta):

  • add, array of strings
  • remove, array of strings

Answer 200 (IpfsDomainPinsChanged): the result

  • domain, object, required
    • user_id, string, required
    • hostname, string, required
    • cert_retry_token, string or null, required
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string, required
    • kind, string, required (must be "dnslink")
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required
    • delegated, boolean, required — true when the row is another account's, managed under a delegation grant
    • delegate_id, string or null — the account that created the row for its owner
    • name_id, string or null — the IPNS name the domain follows
    • pin_count, integer — how many pins the domain serves at /ipfs/<cid> besides its root
    • dns, object, required
      • a, string or null, required — the IPv4 of the serving node: the A record of the hostname
      • dnslink_host, string, required — _dnslink.<hostname>
      • dnslink, string, required — the TXT value: dnslink=/ipns/<name> when the domain follows a reported name, else dnslink=/ipfs/<cid>
  • added, array of strings, required — the pin ids this call attached
  • removed, array of strings, required — the pin ids this call detached
  • pin_count, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
409domain-pin-limit-reached, domain-retireddomain-pin-limit-reached (with limit) or domain-retired
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X POST 'https://api.weird.ro/ipfs/domains/{id}/pins' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

With the CLI (weird storage domains pins update):

$ weird storage domains pins update <hostname|id>

MCP: weird_storage_domain_pins_update.

Point an attached hostname at other content#

POST /ipfs/domains/{id}/retarget · operation retargetIpfsDomain

The domain serves another of the caller's stored cids shortly, and the hostname's DNSLink TXT (when it has one) is rewritten; when the record cannot be written the domain keeps its previous content. The zone holding the hostname must still be the caller's and active. Charged under the contract dns.manage. Retarget it back the same way (charged again). Cost (credit charges in GET /credits/charges): the per_request credit charge of dns.manage is taken from the credits before it runs (402 insufficient-funds when they do not cover it: top up, then retry; it is refunded when the operation fails).

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetysend the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
dns.manageper_requestbefore it runs—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes
Idempotency-Keyheaderstringno1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header idempotent-replay: true; it is not performed or charged a second time.

Request body (RetargetIpfsDomain):

  • cid, string, required — the cid of one of the caller's stored contents

Answer 200 (IpfsDomainRetargeted): the result

  • domain, object, required
    • hostname, string, required — lowercased, without a trailing dot
    • records, array of objects — on an attach: the records written into the zone
      • name, string, required — a name inside the zone, answered lowercased and dotted
      • type, string, required
      • class, string (default "IN")
      • ttl, integer (1 to 2147483647)
      • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string or null
    • zone, string or null, required — the origin of the caller's zone holding the hostname, dotted; null when the caller no longer holds one
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required — the serving node's hostname
  • changed, boolean, required — whether the domain pointed elsewhere before
  • records, array of objects, required — the DNSLink TXT rewritten, empty when the hostname has none
    • name, string, required — a name inside the zone, answered lowercased and dotted
    • type, string, required
    • class, string (default "IN")
    • ttl, integer (1 to 2147483647)
    • data, object, required — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field cid); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request)
401unauthorizedunauthorized
402insufficient-fundsinsufficient-funds (the credits do not cover it: top up with POST /credits/topup, then retry)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a domain or a cid that is not the caller's, a detached domain alike; no zone of the caller holds the hostname)
409conflictconflict (the zone is pending or suspended); conflict (the same operation is still in progress: retry shortly)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503charges-not-published, ledger-unavailable, unavailableunavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/domains/{id}/retarget' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"cid":"<cid>"}'

With the CLI (weird storage domains retarget, weird storage lock add-link, weird storage lock add-password):

$ weird storage domains retarget <hostname|id> <cid>$ weird storage lock add-link <cid|content id|name|local path>$ weird storage lock add-password <cid|content id|name|local path>

MCP: weird_storage_domain_retarget.

Switch detailed statistics on for one of the caller's sites#

POST /ipfs/domains/{id}/stats/detail · operation enableIpfsDomainStatsDetail

Starts detailed statistics for the hostname of your gateway domain id: from then on its visitors are counted as described in GET /ipfs/stats/detail, and every hour it is on uses credits (ipfs.stats-detailed-hourly, per site and hour; switching on itself is charged under ipfs.stats-detailed-enable). You are the controller of your visitors' data and we process it for you under the data processing agreement (GET /legal/documents/{kind}, kind dpa; refused 409 dpa-not-published while none is published): the first time (and again when the text changes), send controller_terms_acknowledged true, having shown the text of GET /legal/acknowledgements (kind stats-detail; also this operation's x-weird-acknowledgement); acknowledgement_version may name the version you showed, and a stale one is refused 409 acknowledgement-outdated with the current version and text. The acceptance is kept with its text, version and time. Visitors' IP addresses, browser identification and referring sites are read on the gateway only to make these counts and are deleted within hours; nothing is added to your pages. When the hours cannot be charged, collection stops (paused unpaid) and resumes by itself once your credits cover them; what was collected stays readable. Only the hostname's owner can switch it (403 stats-owner-only for access given on a domain). An API key needs stats:write granted by name: no wildcard (*, *:write, stats:*) covers it. Idempotent: a site already on answers its state with changed false and is not charged again. A detached hostname is refused 409 domain-retired. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.stats-detailed-enable is taken from the credits before it runs (402 insufficient-funds when they do not cover it: top up, then retry; it is refunded when the operation fails); the per_host_hour credit charge of ipfs.stats-detailed-hourly times the account's sites with detailed statistics on in that hour (each site once per hour it is on for any part of) is billed every hour while what it creates exists; the per_million_requests credit charge of ipfs.stats-detailed-hourly times requests analysed for those sites, per million: the requests of the hour the gateway turned into detailed statistics (a request carrying the Global Privacy Control signal is never analysed nor counted), billed with the hour's charge is billed per use.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetysend the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.stats-detailed-enableper_requestbefore it runs—see the credit charges
ipfs.stats-detailed-hourlyper_host_hourevery hour while it existsthe account's sites with detailed statistics on in that hour (each site once per hour it is on for any part of)see the credit charges
ipfs.stats-detailed-hourlyper_million_requestsper userequests analysed for those sites, per million: the requests of the hour the gateway turned into detailed statistics (a request carrying the Global Privacy Control signal is never analysed nor counted), billed with the hour's chargesee the credit charges

Acknowledgement (kind stats-detail, version 2026-11-21): the order carries controller_terms_acknowledged, all true, only after the person has read and accepted these words:

I ask weird to collect detailed traffic statistics for the sites I switch them on for. For my visitors' data I am the controller: weird processes it only on my instruction, as my processor under weird's data processing agreement (legal document dpa, {dpa}: GET /legal/documents/dpa). For those sites, weird's gateway writes each request's time, the visitor's IP address, the path, the status, the size, the referring page and the browser identification to hourly files on the server that serves them, except requests that send the Global Privacy Control signal; a program on that server turns each closed hour into aggregate statistics and deletes the file at the latest {raw_hours} after its hour began; the files are never copied off that server or backed up. No cookie or script is added to my sites. I will tell my sites' visitors about this measurement in my own privacy notice. Each site with detailed statistics on uses credits for every hour it is on, at the credit charges in force.

Parameters

NameInTypeRequiredDescription
idpathstringyes
Accept-Languageheaderstringnohonoured when the request names no lang (body field or query parameter): its first language the platform speaks (ro, en) by the header's own weights; else the signed-in account's language, else Romanian
Idempotency-Keyheaderstringno1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header idempotent-replay: true; it is not performed or charged a second time.

Request body (EnableIpfsStatsDetail):

  • controller_terms_acknowledged, boolean — true: you confirm the text of GET /legal/acknowledgements (kind stats-detail): you are the controller of your visitors' data and we process it for you; a standing acceptance (the acknowledgement's standing true): required the first time and again when its version changes, and may be left out while the account's accepted version is the current one (must be true)
  • acknowledgement_version, string — optional: the version of the text you showed; a stale one is refused
  • lang, string — optional: the language of the text you showed (recorded with it); else the lang query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of ro, en)
  • totp_code, string (password) — a current authenticator code (the second factor) (a secret: shown once, never logged)
  • backup_code, string (password) — an unused backup code, instead of the authenticator code (a secret: shown once, never logged)

Answer 200 (IpfsDomainStats): the result

  • domain_id, string, required
  • hostname, string, required
  • detail, boolean, required
  • since, string or null
  • changed, boolean, required — false: it was in that state already, nothing changed
  • paused, string or null — unpaid while the hours cannot be charged
  • acknowledgement, object or null
    • kind, string
    • text_version, string
    • dpa_version, string or null — the data processing agreement's version in force when it was accepted
    • lang, string — the language of the text accepted
    • accepted_at, string
    • current, boolean — false: the text changed since; accept the current one at the next switch-on

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field controller_terms_acknowledged); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request)
401unauthorizedunauthorized
402account-unpaid, insufficient-fundsinsufficient-funds (the credits do not cover it: top up with POST /credits/topup, then retry) or account-unpaid (the account's storage charges are unpaid: top up, then retry)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, stats-owner-only, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it), profile-incomplete (complete the profile first: GET /auth/profile says what is missing) or stats-owner-only; enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a domain that is not the caller's)
409acknowledgement-outdated, conflict, domain-retired, dpa-not-published, stats-detail-unavailableacknowledgement-outdated, dpa-not-published (no data processing agreement is published yet), stats-detail-unavailable (detailed statistics are not available) or domain-retired; conflict (the same operation is still in progress: retry shortly)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503charges-not-published, ledger-unavailable, unavailableunavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/domains/{id}/stats/detail' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

With the CLI (weird stats detail on):

$ weird stats detail on <site>

MCP: weird_stats_detail_on.

Switch detailed statistics off for one of the caller's sites#

DELETE /ipfs/domains/{id}/stats/detail · operation disableIpfsDomainStatsDetail

Stops detailed statistics for the hostname of your gateway domain id at once: no more visitor data is read for it and no further hour is charged. The statistics already collected are kept for their usual period and stay readable and exportable. Always possible, also while the account is restricted or its storage unpaid. Only the hostname's owner can switch it; an API key needs stats:write granted by name (no wildcard covers it). Not charged. Idempotent.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (IpfsDomainStats): the result

  • domain_id, string, required
  • hostname, string, required
  • detail, boolean, required
  • since, string or null
  • changed, boolean, required — false: it was in that state already, nothing changed
  • paused, string or null — unpaid while the hours cannot be charged
  • acknowledgement, object or null
    • kind, string
    • text_version, string
    • dpa_version, string or null — the data processing agreement's version in force when it was accepted
    • lang, string — the language of the text accepted
    • accepted_at, string
    • current, boolean — false: the text changed since; accept the current one at the next switch-on

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403enrolment-required, insufficient-scope, profile-incomplete, stats-owner-only, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it), profile-incomplete (complete the profile first: GET /auth/profile says what is missing) or stats-owner-only; enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a domain that is not the caller's)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/domains/{id}/stats/detail' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats detail off):

$ weird stats detail off <site>

MCP: weird_stats_detail_off.

The delegation grants the caller gave and was given#

GET /ipfs/grants · operation listIpfsGrants

The storage access the account gave other accounts on its domains (given) and was given (received), each with its domain, who pays and whether it is active. Grants are made with POST /domains/{domain}/grants. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Answer 200 (IpfsGrantList): the result

  • user_id, string, required
  • given, array of objects, required
    • id, string, required
    • owner_id, string, required
    • grantee_id, string, required
    • domain, string, required — the name the grant covers, itself and every name under it
    • payer, string, required (one of owner, grantee, split)
    • state, string, required (one of active, revoked)
    • created_at, string, required
    • revoked_at, string or null
  • received, array of objects, required
    • id, string, required
    • owner_id, string, required
    • grantee_id, string, required
    • domain, string, required — the name the grant covers, itself and every name under it
    • payer, string, required (one of owner, grantee, split)
    • state, string, required (one of active, revoked)
    • created_at, string, required
    • revoked_at, string or null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/grants' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage grants list):

$ weird storage grants list

MCP: weird_storage_grants.

Let another account manage the gateway domains under one of the caller's names#

POST /ipfs/grants · operation createIpfsGrant

email (the grantee account's login address or a verified linked one), domain (in one of the caller's DNS zones, and not a domain another account registered here), payer (owner, the default, grantee or split). What a delegate creates is the owner's: it counts against the owner's limits and serves the owner's content. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Request body (CreateIpfsGrant):

  • email, string, required — the grantee's address
  • domain, string, required
  • payer, string (one of owner, grantee, split)

Answer 201 (IpfsGrantAnswer): the result

  • grant, object, required
    • id, string, required
    • owner_id, string, required
    • grantee_id, string, required
    • domain, string, required — the name the grant covers, itself and every name under it
    • payer, string, required (one of owner, grantee, split)
    • state, string, required (one of active, revoked)
    • created_at, string, required
    • revoked_at, string or null
  • created, boolean, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field email, domain or payer)
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (no account holds the address; the domain is not in a zone of the caller)
409conflictconflict (that account already has access to the domain, or an invite to it is pending)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X POST 'https://api.weird.ro/ipfs/grants' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"<email>","domain":"<domain>"}'

With the CLI (weird storage grants create):

$ weird storage grants create <email> <domain>

MCP: weird_storage_grant_create.

End a grant (its owner or its grantee)#

DELETE /ipfs/grants/{id} · operation revokeIpfsGrant

The delegate's management ends at once; the domains stay the owner's. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (IpfsGrantChanged): the result

  • grant, object, required
    • id, string, required
    • owner_id, string, required
    • grantee_id, string, required
    • domain, string, required — the name the grant covers, itself and every name under it
    • payer, string, required (one of owner, grantee, split)
    • state, string, required (one of active, revoked)
    • created_at, string, required
    • revoked_at, string or null
  • changed, boolean, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/grants/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage grants revoke):

$ weird storage grants revoke <id>

MCP: weird_storage_grant_revoke.

The caller's IPNS names#

GET /ipfs/names · operation listIpfsNames

503 unavailable while IPNS names are not offered. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Answer 200 (IpfsNameList): the result

  • user_id, string, required
  • names, array of objects, required
    • last_published_cid, string or null, required
    • target_cid, string or null, required
    • user_id, string, required
    • key_name, string, required — the name of the key on the serving node
    • label, string, required — lowercase, hostname-shaped
    • id, string, required
    • key_escrowed?, boolean, required — whether a sealed backup of the name's key is kept (it is never returned)
    • desired, string, required (one of present, absent)
    • name, string or null, required — the k51 IPNS name, null until the node's first report; served at https://<name>.ipns.<gateway-domain>/
    • updated_at, string, required
    • key_escrowed_at, string or null, required
    • state, string, required — creating until the node reports the name, failed while last-error is set, else active (one of creating, failed, active)
    • created_at, string, required
    • removed_at, string or null, required — when the node acknowledged the removal of a retired name
    • last_error, string or null, required — the last error the node reported for the name
    • last_published_at, string or null, required
    • node, string, required — the serving node that holds the key

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/names' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

Create an IPNS name, optionally served as a gateway domain#

POST /ipfs/names · operation createIpfsName

label (a hostname in one of the caller's DNS zones), target_cid (a CIDv0 or a CIDv1), serve (true: the label also becomes a gateway domain following the name; its A record and _dnslink TXT are written in the caller's zone: dns.records). The _dnslink TXT names the content's /ipfs/ path until the name is active; read the domain again then and the TXT names /ipns/<name>. 402 account-unpaid while storage has unpaid charges. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Request body (CreateIpfsName):

  • label, string, required — a hostname in one of the caller's zones
  • target_cid, string — a CIDv0 or a CIDv1
  • serve, boolean

Answer 201 (IpfsNameCreated): the result

  • name, object, required
    • last_published_cid, string or null, required
    • target_cid, string or null, required
    • user_id, string, required
    • key_name, string, required — the name of the key on the serving node
    • label, string, required — lowercase, hostname-shaped
    • id, string, required
    • key_escrowed?, boolean, required — whether a sealed backup of the name's key is kept (it is never returned)
    • desired, string, required (one of present, absent)
    • name, string or null, required — the k51 IPNS name, null until the node's first report; served at https://<name>.ipns.<gateway-domain>/
    • updated_at, string, required
    • key_escrowed_at, string or null, required
    • state, string, required — creating until the node reports the name, failed while last-error is set, else active (one of creating, failed, active)
    • created_at, string, required
    • removed_at, string or null, required — when the node acknowledged the removal of a retired name
    • last_error, string or null, required — the last error the node reported for the name
    • last_published_at, string or null, required
    • node, string, required — the serving node that holds the key
  • domain, object
    • user_id, string, required
    • hostname, string, required
    • cert_retry_token, string or null, required
    • id, string, required
    • desired, string, required (one of present, absent)
    • updated_at, string, required
    • kind, string, required (must be "dnslink")
    • created_at, string, required
    • cid, string, required
    • content_id, string, required
    • node, string, required
    • delegated, boolean, required — true when the row is another account's, managed under a delegation grant
    • delegate_id, string or null — the account that created the row for its owner
    • name_id, string or null — the IPNS name the domain follows
    • pin_count, integer — how many pins the domain serves at /ipfs/<cid> besides its root
    • dns, object, required
      • a, string or null, required — the IPv4 of the serving node: the A record of the hostname
      • dnslink_host, string, required — _dnslink.<hostname>
      • dnslink, string, required — the TXT value: dnslink=/ipns/<name> when the domain follows a reported name, else dnslink=/ipfs/<cid>
  • dns, object — what this API did in the caller's DNS zone for the name

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field label, target_cid or serve; service_host)
401unauthorizedunauthorized
402account-unpaidaccount-unpaid (with unpaid_since, grace_until)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (the label is not in a zone of the caller)
409conflict, domain-limit-reachedconflict (name_conflict, hostname_conflict, name_target_not_stored, serve_domain_conflict) or domain-limit-reached
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
451content-blocked, hostname-blockedhostname-blocked or content-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X POST 'https://api.weird.ro/ipfs/names' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"<label>"}'

One of the caller's IPNS names, with the domains following it#

GET /ipfs/names/{id} · operation getIpfsName

The IPNS name id (GET /ipfs/names lists them): its name once published, what it points at (target_cid), its state and last error, and domains, the gateway domains that follow it. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (IpfsNameView): the result

  • name, object, required
    • last_published_cid, string or null, required
    • target_cid, string or null, required
    • user_id, string, required
    • key_name, string, required — the name of the key on the serving node
    • label, string, required — lowercase, hostname-shaped
    • id, string, required
    • key_escrowed?, boolean, required — whether a sealed backup of the name's key is kept (it is never returned)
    • desired, string, required (one of present, absent)
    • name, string or null, required — the k51 IPNS name, null until the node's first report; served at https://<name>.ipns.<gateway-domain>/
    • updated_at, string, required
    • key_escrowed_at, string or null, required
    • state, string, required — creating until the node reports the name, failed while last-error is set, else active (one of creating, failed, active)
    • created_at, string, required
    • removed_at, string or null, required — when the node acknowledged the removal of a retired name
    • last_error, string or null, required — the last error the node reported for the name
    • last_published_at, string or null, required
    • node, string, required — the serving node that holds the key
  • domains, array of strings, required — the ids of the present domains that follow the name

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/names/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

Retire an IPNS name (final)#

DELETE /ipfs/names/{id} · operation retireIpfsName

The domains that followed it are unlinked and stay; the _dnslink TXT of each is rewritten to the domain's CID (dns.rewritten, dns.failed). Cannot be undone. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (IpfsNameChanged): the result

  • name, object, required
    • last_published_cid, string or null, required
    • target_cid, string or null, required
    • user_id, string, required
    • key_name, string, required — the name of the key on the serving node
    • label, string, required — lowercase, hostname-shaped
    • id, string, required
    • key_escrowed?, boolean, required — whether a sealed backup of the name's key is kept (it is never returned)
    • desired, string, required (one of present, absent)
    • name, string or null, required — the k51 IPNS name, null until the node's first report; served at https://<name>.ipns.<gateway-domain>/
    • updated_at, string, required
    • key_escrowed_at, string or null, required
    • state, string, required — creating until the node reports the name, failed while last-error is set, else active (one of creating, failed, active)
    • created_at, string, required
    • removed_at, string or null, required — when the node acknowledged the removal of a retired name
    • last_error, string or null, required — the last error the node reported for the name
    • last_published_at, string or null, required
    • node, string, required — the serving node that holds the key
  • changed, boolean, required
  • domains, array of objects — after a target change: the domains that follow the name and whether each was retargeted
    • id, string
    • followed, boolean
  • unlinked, array of strings — after a retire: the domains unlinked from the name
  • dns, object — what this API did in the caller's DNS zone for the name

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/names/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

Point an IPNS name at a CID#

PUT /ipfs/names/{id}/target · operation setIpfsNameTarget

cid (a CIDv0 or a CIDv1). Every domain following the name moves too when the account stores content under that CID (followed). Set the previous CID the same way to undo it. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (IpfsCidBody):

  • cid, string, required — a CIDv0 or a CIDv1

Answer 200 (IpfsNameChanged): the result

  • name, object, required
    • last_published_cid, string or null, required
    • target_cid, string or null, required
    • user_id, string, required
    • key_name, string, required — the name of the key on the serving node
    • label, string, required — lowercase, hostname-shaped
    • id, string, required
    • key_escrowed?, boolean, required — whether a sealed backup of the name's key is kept (it is never returned)
    • desired, string, required (one of present, absent)
    • name, string or null, required — the k51 IPNS name, null until the node's first report; served at https://<name>.ipns.<gateway-domain>/
    • updated_at, string, required
    • key_escrowed_at, string or null, required
    • state, string, required — creating until the node reports the name, failed while last-error is set, else active (one of creating, failed, active)
    • created_at, string, required
    • removed_at, string or null, required — when the node acknowledged the removal of a retired name
    • last_error, string or null, required — the last error the node reported for the name
    • last_published_at, string or null, required
    • node, string, required — the serving node that holds the key
  • changed, boolean, required
  • domains, array of objects — after a target change: the domains that follow the name and whether each was retargeted
    • id, string
    • followed, boolean
  • unlinked, array of strings — after a retire: the domains unlinked from the name
  • dns, object — what this API did in the caller's DNS zone for the name

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field cid)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X PUT 'https://api.weird.ro/ipfs/names/{id}/target' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"<cid>"}'

The path maps of the caller's gateway domains#

GET /ipfs/path-maps · operation listPathMaps

Every path map (present and retired) whose hostname is one of the caller's gateway domains; hostname narrows to one of them. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
hostnamequerystringnoone of the caller's hostnames

Answer 200 (PathMapList): the result

  • path_maps, array of objects, required
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • hostname, string, required
    • path_prefix, string, required — normalized: lowercase segments, a leading and a trailing slash
    • pin_id, string, required
    • desired, string, required (one of present, absent)
    • created_at, string, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a hostname that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/ipfs/path-maps' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage path-maps list):

$ weird storage path-maps list

MCP: weird_storage_path_maps.

Serve one of the caller's pins under a path of one of its gateway domains#

POST /ipfs/path-maps · operation createPathMap

https://<hostname><path_prefix> serves the pin's content; the prefix is normalized (lowercase segments under a leading slash, a trailing slash added; the bare root is refused). The hostname must be one of the caller's gateway domains and the pin one of the caller's. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Request body (CreatePathMap):

  • hostname, string, required — one of the caller's gateway domains
  • path_prefix, string, required — the path under the hostname; never the bare root
  • pin_id, string, required — one of the caller's pins (its requestid)

Answer 201 (PathMap): the result

  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • id, string, required
  • hostname, string, required
  • path_prefix, string, required — normalized: lowercase segments, a leading and a trailing slash
  • pin_id, string, required
  • desired, string, required (one of present, absent)
  • created_at, string, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field hostname, path_prefix or pin_id)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a hostname or a pin that is not the caller's)
409conflictconflict (a present path map of the hostname already has the prefix)
429rate-limitedrate-limited
451content-blocked, hostname-blockedhostname-blocked or content-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/path-maps' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"<hostname>","path_prefix":"<path_prefix>","pin_id":"<pin_id>"}'

With the CLI (weird storage path-maps create):

$ weird storage path-maps create <hostname> <path> <pin id>

MCP: weird_storage_path_map_create.

Retire a path map (desired absent)#

DELETE /ipfs/path-maps/{id} · operation deletePathMap

Stops serving the pin under the path map id (desired absent): the path answers nothing once the gateway applies it; the pin and the domain are untouched. Cannot be undone: create the path map again with POST /ipfs/path-maps. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (PathMapChanged): the result

  • path_map, object, required
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • hostname, string, required
    • path_prefix, string, required — normalized: lowercase segments, a leading and a trailing slash
    • pin_id, string, required
    • desired, string, required (one of present, absent)
    • created_at, string, required
  • changed, boolean, required — whether the call changed the desired state

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/path-maps/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage path-maps delete):

$ weird storage path-maps delete <id>

MCP: weird_storage_path_map_delete.

Set a path map's desired state#

POST /ipfs/path-maps/{id}/desired · operation setPathMapDesired

present serves it again, absent stops serving it shortly; the path map stays listed. changed says whether this call did anything. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (PathMapDesired):

  • desired, string, required (one of present, absent)

Answer 200 (PathMapChanged): the result

  • path_map, object, required
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • id, string, required
    • hostname, string, required
    • path_prefix, string, required — normalized: lowercase segments, a leading and a trailing slash
    • pin_id, string, required
    • desired, string, required (one of present, absent)
    • created_at, string, required
  • changed, boolean, required — whether the call changed the desired state

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field desired)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a path map whose hostname is not the caller's)
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/path-maps/{id}/desired' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"desired":"present"}'

With the CLI (weird storage path-maps set):

$ weird storage path-maps set <id> on|off

MCP: weird_storage_path_map_set.

The caller's pins#

GET /ipfs/pins · operation listPins

In the IPFS pinning-service shape: requestid is the pin id, status pinned (served), failed (serving it failed) or queued (not served yet); name is always null (pins have no name here; the filter is accepted and matches nothing); gateway_url is https://<gateway host>/ipfs/<requestid>/ipfs/<cid>, the path form for raw fetches, null when no gateway is available; subdomain_url is the address to open in a browser, https://<cid>.ipfs.<gateway domain>/: each content has its own origin (null when the gateway serves none for it). Retired pins are not listed. No paging: next_cursor is always null, limit cuts the list. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
cidquerystringnoonly the pins of that cid
statusquerystringnoqueued, pinning, pinned or failed
namequerystringnoa pin name; matches nothing
limitqueryintegernoan integer, 1 to 500, default 50 (default 50; 1 to 500)

Answer 200 (PinList): the result

  • pins, array of objects, required
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • subdomain_url, string or null, required — the address to open in a browser: https://<cid>.ipfs.<gateway domain>/, each content on its own origin; null when the gateway serves no such address for it
    • name, null, required — pins have no name here: always null
    • status, string, required — pinned: served; failed: serving it failed; queued: not served yet (pinning is never answered) (one of queued, pinning, pinned, failed)
    • gateway_url, string or null, required — https://<gateway host>/ipfs/<requestid>/ipfs/<cid>: the path form, for raw fetches (a browser opening it is sent to subdomain_url); null when no gateway is available
    • kind, string, required (one of serve, raw)
    • requestid, string, required — the pin id
    • created_at, string, required
    • cid, string, required
    • size_bytes, integer, required
  • next_cursor, null, required — no paging: always null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a non-integer or non-positive limit, an unknown status)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (storage did not answer: try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X GET 'https://api.weird.ro/ipfs/pins' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage pins, weird storage get, weird storage lock list):

$ weird storage pins$ weird storage get <cid|content id|name>$ weird storage lock list <cid|content id|name|local path>

MCP: weird_storage_download, weird_storage_pins, weird_storage_lock_show, weird_storage_lock_contents.

Pin one of the caller's stored contents by its cid#

POST /ipfs/pins · operation createPin

The cid must be one of the caller's stored contents; a pin serving it is created and answered 201. When the caller already has a pin of that cid it is answered 200 instead of a duplicate. name is not supported: a non-blank one is refused 400 (field name). prewarm (a boolean; absent: the default) asks for the content to be made ready to serve at once. Remove it with DELETE /ipfs/pins/{requestid}; repeating the call changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.writes is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.writesper_requestafter a successful answer—see the credit charges

Request body (CreatePin):

  • cid, string, required — the cid of one of the caller's stored contents
  • name, string or null — not supported: a non-blank name is refused
  • prewarm, boolean — make it ready to serve at once; absent: the default

Answer 200 (Pin): the caller's existing present pin of that cid

  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • subdomain_url, string or null, required — the address to open in a browser: https://<cid>.ipfs.<gateway domain>/, each content on its own origin; null when the gateway serves no such address for it
  • name, null, required — pins have no name here: always null
  • status, string, required — pinned: served; failed: serving it failed; queued: not served yet (pinning is never answered) (one of queued, pinning, pinned, failed)
  • gateway_url, string or null, required — https://<gateway host>/ipfs/<requestid>/ipfs/<cid>: the path form, for raw fetches (a browser opening it is sent to subdomain_url); null when no gateway is available
  • kind, string, required (one of serve, raw)
  • requestid, string, required — the pin id
  • created_at, string, required
  • cid, string, required
  • size_bytes, integer, required

Answer 201 (Pin): the result

  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • subdomain_url, string or null, required — the address to open in a browser: https://<cid>.ipfs.<gateway domain>/, each content on its own origin; null when the gateway serves no such address for it
  • name, null, required — pins have no name here: always null
  • status, string, required — pinned: served; failed: serving it failed; queued: not served yet (pinning is never answered) (one of queued, pinning, pinned, failed)
  • gateway_url, string or null, required — https://<gateway host>/ipfs/<requestid>/ipfs/<cid>: the path form, for raw fetches (a browser opening it is sent to subdomain_url); null when no gateway is available
  • kind, string, required (one of serve, raw)
  • requestid, string, required — the pin id
  • created_at, string, required
  • cid, string, required
  • size_bytes, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field cid, name or prewarm)
401unauthorizedunauthorized
402account-unpaidaccount-unpaid (the account's storage charges are unpaid: top up, then retry)
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (no stored content of the caller has that cid)
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/pins' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"<cid>"}'

With the CLI (weird storage pins create, weird storage add, weird tunnels update):

$ weird storage pins create <cid>$ weird storage add <file|folder>$ weird tunnels update <hostname|id>

MCP: weird_storage_upload, weird_storage_pin_create, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

One of the caller's pins#

GET /ipfs/pins/{requestid} · operation getPin

The pin requestid (GET /ipfs/pins lists them): its cid, its status and when it was made. An unknown, retired or another account's pin is 404 alike. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
requestidpathstringyes

Answer 200 (Pin): the result

  • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
    • state, string, required (one of suspended, blocked)
    • reason, string, required (must be "abuse-review")
    • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
    • contact, string — the abuse contact address to write to about it
  • subdomain_url, string or null, required — the address to open in a browser: https://<cid>.ipfs.<gateway domain>/, each content on its own origin; null when the gateway serves no such address for it
  • name, null, required — pins have no name here: always null
  • status, string, required — pinned: served; failed: serving it failed; queued: not served yet (pinning is never answered) (one of queued, pinning, pinned, failed)
  • gateway_url, string or null, required — https://<gateway host>/ipfs/<requestid>/ipfs/<cid>: the path form, for raw fetches (a browser opening it is sent to subdomain_url); null when no gateway is available
  • kind, string, required (one of serve, raw)
  • requestid, string, required — the pin id
  • created_at, string, required
  • cid, string, required
  • size_bytes, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (an unknown pin, another customer's and a retired one alike)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/ipfs/pins/{requestid}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage pins get):

$ weird storage pins get <pin id>

MCP: weird_storage_pins.

Retire one of the caller's pins#

DELETE /ipfs/pins/{requestid} · operation deletePin

The pin stops being served shortly; it leaves the listing and answers 404 afterwards. Answers {"requestid"}. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
requestidpathstringyes

Answer 200 (PinDeleted): the result

  • requestid, string, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/pins/{requestid}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage pins delete):

$ weird storage pins delete <pin id>

MCP: weird_storage_pin_delete.

The detailed statistics of one of the caller's sites#

GET /ipfs/stats/detail · operation getIpfsStatsDetail

For a hostname with detailed statistics switched on (POST /ipfs/domains/{id}/stats/detail): per UTC day visitors (people counted once per site and day), visits (a visit ends after 30 minutes without a request), requests, bytes, bot_requests (declared crawlers), automated_requests (an unusually fast client), sampled_hours and lost_hours (hours counted from a sample on a very busy site, or not counted), hours (the same per UTC hour) and top lists of each dimension asked (dimensions, a comma list; default all): referrers (the referring site's host name only), countries (two-letter codes, -- unknown), browsers, os, devices (desktop, mobile, tablet, bot, other), entry_pages, not_found (missing pages with the site linking to them). Visitors are counted per day with a key that changes every day and differs per site, so they cannot be followed from day to day or across sites: visitors_sum is the sum of daily visitors, not a count of unique people, and there is no monthly unique figure. Requests sent with the Global Privacy Control signal (Sec-GPC: 1) are counted in the summary only. No cookie or script is added to your pages. geo names the source of the countries (IP geolocation by DB-IP, CC BY 4.0) and its version: show it with the countries. format csv answers one line per day. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
subjectquerystringyesa hostname of the caller
fromquerystringnothe first UTC day
toquerystringnothe last UTC day
dimensionsquerystringnoa comma list of referrers, countries, browsers, os, devices, entry_pages, not_found
formatquerystringnojson (default) or csv (one of json, csv)

Answer 200 (IpfsStatsDetail): the result

  • subject, string, required
  • from, string, required
  • to, string, required
  • days, array of objects, required
    • top, object — per dimension asked: referrers, countries, browsers, os, devices, entry_pages, not_found
      • each value: array of objects
    • visits, integer
    • hours, array of objects
      • visits, integer
      • lost, boolean — the hour could not be counted
      • hour, string, required — YYYY-MM-DDTHH, UTC
      • sampled, integer — 1: every request counted; n: one in n counted on a very busy hour
      • bytes, integer
      • automated_requests, integer
      • visitors, integer
      • bot_requests, integer
      • requests, integer
    • complete, boolean — false while the day's lists have not arrived yet
    • lost_hours, integer
    • bytes, integer
    • automated_requests, integer
    • sampled_hours, integer
    • visitors, integer — people counted once per site and day
    • bot_requests, integer
    • day, string, required
    • requests, integer
  • visitors_sum, integer — the sum of daily visitors: not a count of unique people
  • visitors_note, string
  • geo, one of
    • variant 1: object
      • attribution, string
      • licence, string
      • version, string or null
    • variant 2: null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field subject: detailed statistics exist for hostnames only; from, to, dimensions or format)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a hostname that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/detail?subject=<subject>' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats detail):

$ weird stats detail <site>

MCP: weird_stats_detail.

Download a site's or pin's statistics#

GET /ipfs/stats/export · operation exportIpfsStats

The statistics of one subject over a range as a file: level summary (default: one row per day of the summary) or detail (one row per day of the detailed statistics), format csv (default; the header is columns; a cell starting with =, +, - or @ is written with a leading ' so a spreadsheet never runs it) or json (columns and rows, the values exactly as recorded, never prefixed). At most the longest range allowed (400 days unless announced otherwise) per request. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
subjectquerystringyesa hostname, a pin id or a CID
fromquerystringnothe first UTC day
toquerystringnothe last UTC day
levelquerystringnosummary (default) or detail (one of summary, detail)
formatquerystringnocsv (default) or json (one of csv, json)

Answer 200 (IpfsStatsExport): the result

  • subject, string, required
  • kind, string (one of domain, pin, content, name)
  • level, string, required (one of summary, detail)
  • from, string, required
  • to, string, required
  • columns, array of strings, required — the column names, in order (the CSV header)
  • rows, array of objects, required — one object per row, keyed by the column names: summary, one row per day (the hours as h00..h23); detail, one row per day, per hour and per list entry, record (day, hour or top) saying which

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field subject: level detail for a subject that is no hostname; from, to, level or format)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a subject that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/export?subject=<subject>' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats export):

$ weird stats export <site>

MCP: weird_stats_export.

The top pages or the 404 list of a site or pin on one day#

GET /ipfs/stats/paths · operation getIpfsStatsPaths

kind top (default): the most requested paths of the day (path, requests, bytes, error: how far the count may be over, for very varied sites), then other_requests and other_bytes for every other path and distinct_paths_estimate. kind 404: the paths answered not found, most requested first (links to fix). Paths never carry their query string; a very long path is cut. day defaults to yesterday (UTC). Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
subjectquerystringyesa hostname, a pin id or a CID
dayquerystringnoa UTC day (default yesterday)
kindquerystringnotop (default) or 404 (one of top, 404)

Answer 200 (IpfsStatsPaths): the result

  • subject, string, required
  • day, string, required
  • kind, string, required (one of top, 404)
  • paths, array of objects, required
    • path, string, required — the path without its query string; a very long one is cut
    • requests, integer, required
    • bytes, integer
    • error, integer — how far the count may be over
  • other_requests, integer
  • other_bytes, integer
  • distinct_paths_estimate, integer

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field subject, day or kind)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a subject that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/paths?subject=<subject>' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats pages):

$ weird stats pages <site>

MCP: weird_stats_pages.

Which of the caller's sites have detailed statistics on#

GET /ipfs/stats/settings · operation getIpfsStatsSettings

hosts: each of your hostnames with detail (on or off), since and paused (unpaid: collection stopped because its hours could not be charged; it resumes by itself once your credits cover them); available (whether detailed statistics are offered now); raw_max_hours (the most hours a visitor's raw request record lives on the gateway before it is counted and deleted); acknowledgement: the text you accept before switching them on for the first time (version, lang, text, fields, standing, required, relies_on: the same object, text and version as kind stats-detail of GET /legal/acknowledgements, from one source, in the request's language) and the one you accepted (accepted: text_version, dpa_version, lang, accepted_at, current); dpa_paused: the sites whose detailed statistics were paused automatically because the account had not accepted the data processing agreement in force (domain_id, hostname, dpa_version, paused_at; accepting it with POST /auth/legal/accept switches them back on). Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
langquerystringnothe language of the texts answered: ro or en (any other value is refused 400 invalid-params, field lang); without it, the Accept-Language header, else the signed-in account's language, else Romanian (one of ro, en)
Accept-Languageheaderstringnohonoured when the request names no lang (body field or query parameter): its first language the platform speaks (ro, en) by the header's own weights; else the signed-in account's language, else Romanian

Answer 200 (IpfsStatsSettings): the result

  • hosts, array of objects, required
    • domain_id, string, required
    • hostname, string, required
    • detail, boolean, required
    • since, string or null
    • paused, string or null
  • available, boolean, required — whether detailed statistics are offered now
  • raw_max_hours, integer — the most hours a visitor's raw request record (IP address, browser identification, referring site) lives on the gateway before it is counted and deleted (the setting in force); the acknowledgement's text names the same window
  • acknowledgement, object, required — the object of kind stats-detail of GET /legal/acknowledgements (one source: the same text and version), with accepted
    • lang, string — the language of text: the lang query parameter, else Accept-Language, else the account's language, else Romanian (one of ro, en)
    • accepted, object or null
      • kind, string
      • text_version, string
      • dpa_version, string or null — the data processing agreement's version in force when it was accepted
      • lang, string — the language of the text accepted
      • accepted_at, string
      • current, boolean — false: the text changed since; accept the current one at the next switch-on
    • relies_on, array of objects — the legal documents this acknowledgement relies on: kind (read it with read, GET /legal/documents/{kind}) and, in a live answer, its current version (null: not published yet, and the operation that asks for this acknowledgement is refused until it is)
      • kind, string
      • read, string
      • version, string or null
    • standing, boolean
    • text, string
    • kind, string
    • required, string
    • version, string
    • fields, array of strings
  • dpa_paused, array of objects, required — the sites whose detailed statistics were paused automatically because the account had not accepted the data processing agreement in force; accepting it (POST /auth/legal/accept with dpa_version) switches them back on
    • domain_id, string, required
    • hostname, string or null, required
    • dpa_version, string or null, required — the data processing agreement in force that the account had not accepted
    • paused_at, string, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/settings' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats settings, weird stats detail off, weird stats detail on):

$ weird stats settings$ weird stats detail off <site>$ weird stats detail on <site>

MCP: weird_stats_settings.

The caller's sites, pins and contents with traffic#

GET /ipfs/stats/subjects · operation listIpfsStatsSubjects

Every hostname, pin and content of the caller that was requested in the range (from, to: UTC days, both included; by default the last 30 days; at most the longest range allowed, 400 days unless announced otherwise): subject (the hostname, the pin id or the CID), kind (domain: one of your hostnames or free names; name: one of your names; pin: a pin's shareable link /ipfs/<pin-id>/ipfs/<cid>; content: the content's own address <cid>.ipfs.<gateway domain> and its bare /ipfs/<cid> link, counted for the account that is billed for that traffic), requests, bytes, and for a hostname detail (enabled, since, paused: unpaid while the hours cannot be charged). Statistics describe your sites' traffic: the summary never holds anything about the visitors themselves. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
fromquerystringnothe first UTC day, YYYY-MM-DD
toquerystringnothe last UTC day, YYYY-MM-DD (default today)

Answer 200 (IpfsStatsSubjects): the result

  • from, string, required
  • to, string, required
  • subjects, array of objects, required
    • subject, string, required — a hostname, a pin id, a CID or the key of an IPNS name (kind says which)
    • kind, string, required (one of domain, pin, content, name)
    • requests, integer
    • bytes, integer
    • detail, object
      • enabled, boolean, required
      • since, string or null
      • paused, string or null — unpaid: collection stopped while the hours cannot be charged; null otherwise

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field from or to: a malformed day, from after to, or a longer range than allowed)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/subjects' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats sites):

$ weird stats sites

MCP: weird_stats_sites.

The daily traffic summary of a site or pin#

GET /ipfs/stats/summary · operation getIpfsStatsSummary

Included with storage, for every hostname and pin: per UTC day requests (every status), served_requests (answered with content), bytes and served_bytes, hot_bytes and cold_bytes with the cache hit ratios (cache_hit_ratio_bytes, cache_hit_ratio_requests: the share served from the gateway's cache), status (counts of 2xx, 3xx, 4xx, 5xx, and exactly 404 and 451), by_hour (24 counts, UTC hours; unknown_hour for requests with no recorded hour), and totals over the range. subject is a hostname (also <cid>.ipfs.<gateway domain>), a pin id, a CID or the key of one of your IPNS names (any subject of GET /ipfs/stats/subjects, whose kind the answer repeats); a pin's summary also covers its content's own address when that traffic is billed to you (parts). Made from the gateway's log of host, path without its query, status, size, cache tier and hour: nothing about who visited. The numbers are as logged; your bill is authoritative. format csv answers a CSV file (one line per day, hours as h00..h23). Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
subjectquerystringyesa hostname, a pin id or a CID
fromquerystringnothe first UTC day
toquerystringnothe last UTC day
formatquerystringnojson (default) or csv (one of json, csv)

Answer 200 (IpfsStatsSummary): the result

  • subject, string, required
  • kind, string, required (one of domain, pin, content, name)
  • from, string, required
  • to, string, required
  • days, array of objects, required
    • cache_hit_ratio_bytes, number or null — the share of bytes served from the gateway's cache
    • served_bytes, integer
    • served_requests, integer
    • hot_requests, integer
    • cold_bytes, integer
    • by_hour, array of integers — requests per UTC hour, 00 to 23 (24 to 24 items)
    • status, object — requests per status class, and exactly 404 and 451
      • 404, integer
      • 451, integer
      • 2xx, integer
      • 3xx, integer
      • 4xx, integer
      • 5xx, integer
    • hot_bytes, integer
    • bytes, integer, required
    • day, string, required
    • cold_requests, integer
    • cache_hit_ratio_requests, number or null — the share of requests served from the gateway's cache
    • requests, integer, required
    • unknown_hour, integer — requests with no recorded hour
  • totals, object — the sums over the range (a day's fields without day)
    • requests, integer, required
    • served_requests, integer
    • bytes, integer, required
    • served_bytes, integer
    • hot_bytes, integer
    • cold_bytes, integer
    • hot_requests, integer
    • cold_requests, integer
  • parts, array of objects — for a pin: what its summary covers
    • kind, string (one of domain, pin, content, name)
    • key, string
  • note, string

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field subject, from, to or format)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a subject that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/summary?subject=<subject>' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats summary):

$ weird stats summary <site>

MCP: weird_stats_summary.

Today's running counters of a site or pin#

GET /ipfs/stats/today · operation getIpfsStatsToday

Today's (UTC) requests, served_requests, bytes, served_bytes and status classes so far, updated within minutes (updated_at); the day's full summary, with its hours and pages, follows after the day ends. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionstats:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
subjectquerystringyesa hostname, a pin id or a CID

Answer 200 (IpfsStatsToday): the result

  • served_bytes, integer
  • served_requests, integer
  • updated_at, string or null
  • status, object — requests per status class, and exactly 404 and 451
    • 404, integer
    • 451, integer
    • 2xx, integer
    • 3xx, integer
    • 4xx, integer
    • 5xx, integer
  • subject, string, required
  • bytes, integer
  • kind, string (one of domain, pin, content, name)
  • day, string, required
  • requests, integer

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field subject)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a subject that is not the caller's)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/stats/today?subject=<subject>' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird stats today):

$ weird stats today <site>

MCP: weird_stats_today.

Switch storage on for the caller, or acknowledge the storage location notice#

POST /ipfs/storage/enable · operation enableIpfsStorage

Once per account, before the first upload: storage is set up with each copy at a different storage provider (two copies by default), all within the notice's placement regions, and a one-off enabling fee is charged (its credit charge is in GET /credits/charges). Calling it again answers the same state with charged false and charges nothing. The body is optional: location_notice_version (a positive integer) acknowledges that version of the storage location notice (GET /ipfs/storage/location-notice); its text must be published (503 location-notice-unavailable otherwise). The acknowledgement is recorded with its time; an account already enabled acknowledges this way too, without a charge. While the notice is required, enabling without it is refused 409 location-notice-required, and a version that is not the one in force 409 location-notice-outdated, both before anything is charged. Too few storage providers in the placement regions answer 503 not-enough-providers (nothing was charged; try again later). The answer's location_notice is where the caller stands afterwards. Cost (credit charges in GET /credits/charges): the per_data_set credit charge of ipfs.storage-enable times copies is charged once.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetya repeat is refused or changes nothing: storage is enabled once per account: a repeat answers the same state with charged false and charges nothing

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.storage-enableper_data_setoncecopiessee the credit charges

Request body (IpfsEnableStorage), optional:

  • location_notice_version, integer — the version of the storage location notice read and acknowledged (at least 1)

Answer 200 (IpfsStorageEnabled): the result

  • enabled, boolean, required
  • charged, boolean, required — whether this call booked the one-off enabling charge; false on every later call
  • copies, integer, required — the copies every content of the account is kept as, one data set each
  • data_sets, array of objects, required
    • id, string, required
    • provider_id, string, required — the storage provider holding this copy
    • state, string, required — pending until the first upload completes, then active
    • country, string or null — the country the storage provider declares (ISO 3166-1 alpha-2; the provider's own statement, not verified); null when it names none
    • eea, boolean — whether that country is in the European Economic Area
  • location_notice, object
    • version, integer, required
    • text_key, string, required — storage-location-notice-<placement_regions>-v<version>
    • placement_regions, string, required (one of eea, eea-adequacy, any)
    • required, boolean, required — whether enabling storage and opening an upload need the acknowledgement
    • accepted, object or null, required
      • version, integer
      • text_key, string
      • placement_regions, string
      • accepted_at, string
    • satisfied, boolean, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field location_notice_version)
401unauthorizedunauthorized
402account-unpaid, insufficient-fundsinsufficient-funds (balance, estimate) or account-unpaid (the account's storage charges are unpaid: top up, then retry)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
409location-notice-outdated, location-notice-requiredlocation-notice-required (version, text_key, placement_regions) or location-notice-outdated (accepted_version, version, text_key, placement_regions)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503location-notice-unavailable, not-enough-providers, unavailableunavailable (IPFS storage is not available now), location-notice-unavailable (version, text_key: the notice's text is not published yet) or not-enough-providers (copies, eligible_providers, charged false, placement_regions, excluded_by_region: try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/storage/enable' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

With the CLI (weird storage enable):

$ weird storage enable

MCP: weird_storage_enable.

The storage location notice and where the caller stands with it#

GET /ipfs/storage/location-notice · operation getIpfsLocationNotice

Where the copies of the caller's content may be kept, as information (not a legal basis for a transfer): the notice in force, version, text_key (storage-location-notice-<placement_regions>-v<version>), placement_regions (eea: storage providers in the European Economic Area only, the default; eea-adequacy: also countries an adequacy decision covers; any), required (whether enabling storage and opening uploads need the acknowledgement), accepted (the caller's latest acknowledgement, null when none) and satisfied; and text, the notice's text (title, body, url, published_at; null while it is not published, when it cannot be acknowledged). Acknowledge it with POST /ipfs/storage/enable and location_notice_version. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Answer 200 (IpfsLocationNotice): the result

  • version, integer, required
  • text_key, string, required — storage-location-notice-<placement_regions>-v<version>
  • placement_regions, string, required (one of eea, eea-adequacy, any)
  • required, boolean, required — whether enabling storage and opening an upload need the acknowledgement
  • accepted, object or null, required
    • version, integer
    • text_key, string
    • placement_regions, string
    • accepted_at, string
  • satisfied, boolean, required
  • text, object or null, required — the notice's text as published here; null while it is not
    • title, string
    • body, string
    • url, string or null
    • published_at, string

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X GET 'https://api.weird.ro/ipfs/storage/location-notice' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage notice, weird storage enable):

$ weird storage notice$ weird storage enable

MCP: weird_storage_location_notice.

Open an upload session#

POST /ipfs/uploads · operation createUpload

Opens a multipart upload and answers its token and where the parts go. format is raw (any file: the bytes are chunked for the caller), car (CARs the caller packed: root_cid and part_count required, one CAR per part) or zip-folder (one zip stored as a folder; neither root_cid nor part_count is accepted). size_bytes is the declared total (a zip's byte length) and binds the session; copies raises the copy count above the account's (at least two). The parts are sent to upload_url, not to this API: PUT <upload_url>/parts/<n> with the header X-Upload-Token: <token> and Content-Length, parts numbered from 1; raw input sends part_count parts of exactly part_bytes bytes, the last one the remainder; car sends one CAR per part, each at most part_bytes; a zip folder sends the whole zip as part 1 and that answer's part_root is the folder's CID. A part answers 409 part-done once recorded, 409 part-claimed while it is being received elsewhere, 503 node-busy (no room for the part right now: send it again later), 422 car-invalid or zip-invalid for bytes that are not what the format says, 413 zip-too-large for a zip over its unpack limits (these codes are kebab-case like every other refusal; the detail fields beside them, such as reason, limit, max, part_root, stay snake_case). Then complete the session (POST /ipfs/uploads/{id}/complete) and poll it (GET /ipfs/uploads/{id}) until stored. Storage must be enabled first (POST /ipfs/storage/enable). Content the customer encrypted is stored as the opaque bytes it is: the CID names the ciphertext and the gateway serves it as application/octet-stream. Cost (credit charges in GET /credits/charges): the per_mb_hour credit charge of recurring.ipfs-pin-hourly times size in MB x copies is billed every hour while what it creates exists; the per_mb_served credit charge of recurring.ipfs-pin-hourly is billed per use.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedyes — see the charges below
Retry safetysend the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
recurring.ipfs-pin-hourlyper_mb_hourevery hour while it existssize in MB x copiessee the credit charges
recurring.ipfs-pin-hourlyper_mb_servedper use—see the credit charges

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringno1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header idempotent-replay: true; it is not performed or charged a second time.

Request body (CreateUpload):

  • format, string, required — raw: any file, chunked for the caller; car: CARs the caller packed; zip-folder: one zip stored as a folder (one of raw, car, zip-folder)
  • size_bytes, integer, required — the declared total in bytes; a zip's byte length (at least 1)
  • copies, integer — the copies to keep, at distinct providers; default the account's, at least 2 (at least 2)
  • root_cid, string — car only, required: the root CID of the CARs
  • part_count, integer — car only, required: how many CARs (at least 1)
  • name, string
  • content_type, string

Answer 201 (UploadSession): the result

  • id, string, required
  • token, string (password), required — the session token every part is sent with (X-Upload-Token) (a secret: shown once, never logged)
  • upload_url, string or null, required — the base the parts are sent under (PUT <upload_url>/parts/<n>); null when uploads cannot be received now
  • part_bytes, integer, required — the size of one part
  • part_count, integer, required
  • expires_at, string, required
  • format, string, required (one of raw, car, zip-folder)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-params, zip-too-largeinvalid-params (field format, size_bytes, copies, root_cid, part_count, name or content_type) or zip-too-large (size_bytes, max_bytes); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request)
401unauthorizedunauthorized
402account-unpaid, insufficient-fundsinsufficient-funds (balance, estimate) or account-unpaid (the account's storage charges are unpaid: top up, then retry)
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
409conflict, location-notice-required, not-enough-providers, storage-not-enabled, unavailablestorage-not-enabled (call the enable route first), location-notice-required (version, text_key, placement_regions: acknowledge the storage location notice through the enable route) or not-enough-providers (copies, eligible_providers, charged false, placement_regions, excluded_by_region: storage is unavailable in the region; nothing was charged); conflict (the same operation is still in progress: retry shortly)
413content-too-largecontent-too-large (size_bytes, max_content_bytes)
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (uploads cannot be opened now: try again later)

Example

curl -X POST 'https://api.weird.ro/ipfs/uploads' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"format":"raw","size_bytes":1}'

With the CLI (weird storage add, weird tunnels update, weird storage lock add-link):

$ weird storage add <file|folder>$ weird tunnels update <hostname|id>$ weird storage lock add-link <cid|content id|name|local path>

MCP: weird_storage_upload, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

The caller's upload sessions, newest first#

GET /ipfs/uploads · operation listIpfsUploads

The account's upload sessions (POST /ipfs/uploads opens them), newest first: each with its state, format, declared size, parts, copies and when it expires. state narrows the list; limit and offset page it. Changes nothing. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
statequerystringno
limitqueryintegernoa page
offsetqueryintegernorows to skip (at least 0)

Answer 200 (IpfsUploadList): the result

  • user_id, string, required
  • uploads, array of objects, required
    • part_count, integer, required
    • format, string, required
    • root_cid, string or null
    • expires_at, string, required
    • name, string or null
    • copies, integer, required
    • state, string, required
    • created_at, string, required
    • session_id, string, required
    • size_bytes, integer, required
  • total, integer, required
  • limit, integer, required
  • offset, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is unavailable right now)

Example

curl -X GET 'https://api.weird.ro/ipfs/uploads' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage uploads):

$ weird storage uploads

MCP: weird_storage_uploads.

One of the caller's upload sessions#

GET /ipfs/uploads/{id} · operation getUpload

The state (open, completing, stored, failed, aborted; expired for an open session past its expiry), what the session was opened with, every part received, cid once stored and error when completion failed. A zip folder keeps reading format zip-folder with size_bytes the zip's; its one part reports the unpacked size. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (UploadStatus): the result

  • part_count, integer, required
  • parts, array of objects, required
    • n, integer, required
    • state, string, required
    • size_bytes, integer or null, required — null until the part is recorded
  • part_bytes, integer, required
  • error, string or null, required — why completion failed; null otherwise
  • id, string, required
  • expires_at, string, required
  • copies, integer, required
  • state, string, required (one of open, completing, stored, failed, aborted, expired)
  • cid, string or null, required — the content's root CID; null until stored
  • size_bytes, integer, required
  • format, string, required (one of raw, car, zip-folder)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (an unknown session and another customer's alike)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X GET 'https://api.weird.ro/ipfs/uploads/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage uploads get, weird storage add, weird tunnels update):

$ weird storage uploads get <upload id>$ weird storage add <file|folder>$ weird tunnels update <hostname|id>

MCP: weird_storage_upload, weird_storage_uploads, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

Abort one of the caller's upload sessions#

DELETE /ipfs/uploads/{id} · operation abortUpload

An open, failed or expired session becomes aborted; nothing is billed. A second call answers the same. An aborted session cannot be reopened: open a new one with POST /ipfs/uploads. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (UploadState): the result

  • id, string, required
  • state, string, required (one of open, completing, stored, failed, aborted, expired)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
409session-not-opensession-not-open (state: completing or stored)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X DELETE 'https://api.weird.ro/ipfs/uploads/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage uploads abort, weird storage add, weird tunnels update):

$ weird storage uploads abort <upload id>$ weird storage add <file|folder>$ weird tunnels update <hostname|id>

MCP: weird_storage_upload, weird_storage_upload_abort, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

Complete one of the caller's upload sessions#

POST /ipfs/uploads/{id}/complete · operation completeUpload

Every part must be received; CAR input must link into one DAG under the declared root. The session moves to completing and the content is stored afterwards: poll the session until stored (its cid is then the content's) or failed (completing again resumes). A session already completing answers the same. No body. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 202 (UploadState): the result

  • id, string, required
  • state, string, required (one of open, completing, stored, failed, aborted, expired)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
409parts-missing, session-not-openparts-missing (missing: the part numbers) or session-not-open (state)
413content-too-largecontent-too-large (the CARs received exceed the declared size)
422car-invalidcar-invalid (reason, cid, n)
429rate-limitedrate-limited
451content-blockedcontent-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (IPFS storage is not available now)

Example

curl -X POST 'https://api.weird.ro/ipfs/uploads/{id}/complete' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage add, weird tunnels update, weird storage lock add-link):

$ weird storage add <file|folder>$ weird tunnels update <hostname|id>$ weird storage lock add-link <cid|content id|name|local path>

MCP: weird_storage_upload, weird_storage_lock_upload, weird_tunnels_set_offline_folder.

The caller's metered storage usage#

GET /ipfs/usage · operation getIpfsUsage

The stored bytes and content count, the served bytes and request counts since the last billing, and the amounts the next billing charges. Cost (credit charges in GET /credits/charges): the per_request credit charge of ipfs.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionipfs:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
ipfs.readsper_requestafter a successful answer—see the credit charges

Answer 200 (IpfsUsage): the result

  • user_id, string, required
  • served_bytes, integer, required
  • facts, object, required
    • size_mb, string, required — megabytes, rounded up, as text
    • served_mb, string, required — megabytes, rounded down, as text
  • updated_at, string or null, required
  • stored_bytes, integer, required
  • size_mb, integer, required — rounded up
  • served_mb, integer, required — rounded down: what the next billing charges
  • reads, integer, required
  • content_count, integer, required
  • writes, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/ipfs/usage' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird storage status, weird status):

$ weird storage status$ weird status

MCP: weird_storage_status.

This page is generated from the API's public document; it changes when the document does.