GET /v1/render/artifacts/{artifact_id}/content/{name}
The node side of artifact URLs. People and agents use the artifact's `url`, `https://usercontent.b3os.org/a/<artifact host id>/<name>?node=<node>&exp=<exp>&sig=<sig>`; the usercontent Worker checks the signature and serves the bytes from storage, or, until the upload has finished, from this route through the tunnel (with the same `node`, `exp` and `sig`). beta-api.b3os.org and beta.b3os.org never serve this route (`x-b3os-host: usercontent`). **Signature.** `sig` is the base64url (no padding) Ed25519 signature, made with the node key (the one that signs usage batches; the edge holds its public key), over the UTF-8 bytes of ``` "b3os-url-v1\n" + node + "\n" + method + "\n" + path + "\n" + exp ``` `node` is the signing node's ID (`n1`, also the `node` query parameter), `method` is `GET` (a `HEAD` request is checked as `GET`), `path` is this route's path, `/v1/render/artifacts/<artifact_id>/content/<name>`, with the ID in `art_` form (not the host-safe `art-` form of the usercontent path), and `exp` is the expiry in Unix seconds, written in decimal without leading zeros. Other query parameters are not signed and are ignored. The Worker and the node both check the signature (`verify_strict`) and that `exp` has not passed; the node also checks that `node` is its own ID. A refused URL is `403 signed_url_invalid` with `reason`. `name` is the artifact's file name as it appears in `url`; any other name is `404 artifact_not_found`. **Response.** The artifact's bytes with its content type, `Content-Security-Policy: sandbox` (so a page or SVG never runs scripts or reads the origin) and `X-Content-Type-Options: nosniff`. One byte range per request (`Range: bytes=…`) is answered with `206`; an unsatisfiable or multi-part range is ignored and the whole artifact is returned. The response starts within 65 seconds; large videos then stream at the speed of the node's uplink.

Path Parameters

artifact_id string required path
The artifact ID (`art_…`).
Example: "art_01m5t41x77fg4pdnm2ryq73wgs"
name string required path
The artifact's file name, as in its `url`.
Example: "screenshot.webp"

Query Parameters

node string required query
ID of the node that signed the URL.
Example: "n1"
exp integer required query
When the URL expires, in Unix seconds.
Example: 1793040000
sig string required query
Base64url (no padding) Ed25519 signature of the canonical string above.
Example: "qOxWOOryXIikfgvLdKZ3rjxZyxuO_eFCf-VXOHy2Zf5AEuXtOr-JsyyXTvIPP8joM4Rbp519aKjyAkMMxVAvAQ"

Header Parameters

Range string optional header
One byte range, such as `bytes=0-1048575`.

Responses

200 The artifact.
image/*
string (binary)
206 One byte range of the artifact.
400 The request failed validation (`invalid_request`, `invalid_url`).
403 The signed URL is missing parameters, malformed, expired, altered, or not signed by this node (`signed_url_invalid`).
404 No such artifact in this project (`artifact_not_found`).
410 The artifact was deleted at the end of its retention period (`artifact_expired`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/render/artifacts/art_01m5t41x77fg4pdnm2ryq73wgs/content/screenshot.webp?node=n1&exp=1793040000&sig=qOxWOOryXIikfgvLdKZ3rjxZyxuO_eFCf-VXOHy2Zf5AEuXtOr-JsyyXTvIPP8joM4Rbp519aKjyAkMMxVAvAQ' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/render/artifacts/art_01m5t41x77fg4pdnm2ryq73wgs/content/screenshot.webp?node=n1&exp=1793040000&sig=qOxWOOryXIikfgvLdKZ3rjxZyxuO_eFCf-VXOHy2Zf5AEuXtOr-JsyyXTvIPP8joM4Rbp519aKjyAkMMxVAvAQ', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/render/artifacts/art_01m5t41x77fg4pdnm2ryq73wgs/content/screenshot.webp?node=n1&exp=1793040000&sig=qOxWOOryXIikfgvLdKZ3rjxZyxuO_eFCf-VXOHy2Zf5AEuXtOr-JsyyXTvIPP8joM4Rbp519aKjyAkMMxVAvAQ', headers=headers)print(response.json())
200 Response
"<binary>"
Ask a question... ⌘I