API quickstart
Create an API key, check it with /v1/me, and download a pack from the command line.
The threejsassets REST API lets a script do what you would otherwise do in the browser: list what you own and download it. This guide goes from zero to a downloaded pack ZIP in three steps.
Everything lives under https://threejsassets.com/api/v1. Every endpoint is a GET, every response is JSON, and every authenticated call carries an API key.
1. Create an API key
Sign in and open Account → Connections. Select Create API key in the API keys section — the form opens in a dialog (a bottom sheet on a phone). Give the key a name you will recognise later (ci-build-server, laptop), leave both scopes ticked, and choose an expiry.
The key is shown once, in that same dialog as soon as it is created, with a Copy button beside it:
tja_live_9f2cKp3xQm7RvL0aZs4Td8Bn1YhE6Wug_4kR7pqCopy it into your password manager or your CI secret store before you select Done. There is no way to display it again — if you lose it, revoke it and create another.
API access requires a purchase. If you have not bought a pack or lifetime access yet, the Connections tab explains that instead of offering the Create API key button.
2. Check the key works
Export it and call /v1/me. This is the "is my key alive" endpoint, and the first thing to try when anything else misbehaves.
export TJA_API_KEY="tja_live_…"
curl -s https://threejsassets.com/api/v1/me \
-H "Authorization: Bearer $TJA_API_KEY"{
"data": {
"account": { "id": "usr_…", "email": "you@studio.com", "name": "You" },
"entitlements": {
"lifetime": false,
"owned_product_slugs": ["cozy-village"],
"pack_count": 1,
"asset_count": 214
},
"key": {
"id": "key_…",
"name": "ci-build-server",
"preview": "tja_live_9f2cKp",
"scopes": ["catalog:read", "downloads:read"],
"created_at": "2026-08-02T09:14:00.000Z",
"last_used_at": "2026-08-02T09:16:22.000Z"
}
}
}key.preview and key.name tell you which key you just used — useful when four of them are spread across four machines.
3. List the packs you own
curl -s "https://threejsassets.com/api/v1/packs" \
-H "Authorization: Bearer $TJA_API_KEY"{
"data": [
{
"slug": "cozy-village",
"name": "Cozy Village",
"description": "A stylised low-poly village kit.",
"asset_count": 96,
"categories": ["buildings", "nature", "props"],
"purchased_at": "2026-06-11T18:02:41.000Z",
"order_id": "ord_…",
"downloads": {
"bundle": "https://threejsassets.com/api/v1/packs/cozy-village/download",
"authoring": "https://threejsassets.com/api/v1/packs/cozy-village/download?edition=authoring"
}
}
],
"pagination": { "limit": 50, "offset": 0, "total": 1, "has_more": false, "next_cursor": null }
}Use the URLs in downloads rather than building them yourself — that way the download path can change without breaking your script.
4. Download the pack
curl -L --fail \
-H "Authorization: Bearer $TJA_API_KEY" \
-o cozy-village-pack.zip \
https://threejsassets.com/api/v1/packs/cozy-village/downloadThe response is the licensed pack ZIP with a Content-Disposition filename, a strong ETag, and Accept-Ranges: bytes. A half-finished download can be resumed:
curl -L --fail -C - \
-H "Authorization: Bearer $TJA_API_KEY" \
-o cozy-village-pack.zip \
https://threejsassets.com/api/v1/packs/cozy-village/downloadAdd ?edition=authoring to fetch the editable edition when a pack has one.
5. Download a single asset
curl -L --fail \
-H "Authorization: Bearer $TJA_API_KEY" \
-o bld-tavern-inn-01.glb \
https://threejsassets.com/api/v1/assets/bld-tavern-inn-01/downloadFree assets download with any valid key. Premium assets need the pack (or lifetime access) in your purchases.
A whole-library sync, end to end
#!/usr/bin/env bash
set -euo pipefail
API="https://threejsassets.com/api/v1"
AUTH="Authorization: Bearer ${TJA_API_KEY}"
mkdir -p packs
curl -s "$API/packs?limit=100" -H "$AUTH" \
| jq -r '.data[].slug' \
| while read -r slug; do
echo "→ $slug"
curl -L --fail -C - -H "$AUTH" -o "packs/${slug}.zip" \
"$API/packs/${slug}/download"
doneDownloads are rate limited more tightly than metadata reads, so pull sequentially rather than in parallel. See API errors and rate limits.
Next steps
- API authentication and keys — scopes, expiry, revoking, and why a
TJA_license key is not an API key. - API endpoint reference — every route, parameter, and response field.
- API errors and rate limits — the error codes to branch on.