Skip to content

Attach a sidecar file to a 3D model asset

POST
/assets/{id}/companions

Streams the file body content-addressed into storage, then attaches it to the asset at the given relative path. If a companion already exists at that path it is replaced (the old pin is removed; the storage object lives on if other pins reference it).

id
required
string format: uuid
X-Companion-Path
required
string
>= 1 characters <= 512 characters

Relative path the model file references this companion at. Slashes are allowed for subdirectory layouts (‘textures/foo.png’). Limited to 512 chars.

X-Content-Type
string

MIME type of the companion bytes. If absent we default to application/octet-stream.

string format: binary

Companion attached

A sidecar file (texture, MTL, .bin, etc.) attached to a 3D model asset under a relative path. The viewer’s LoadingManager rewrites the model’s relative resource references through these entries so external resources resolve to the right content-addressed blob.

object
id
required
string format: uuid
asset_id
required
string format: uuid
path
required

Relative path the model file references this companion at — e.g. ‘character.mtl’ for an OBJ’s sibling .mtl, or ‘textures/foo.png’ for a glTF texture in a subdirectory.

string
Example
textures/character-a.png
content_type
required
string
Example
image/png
size_bytes
required
integer format: int64
created_at
required
string format: date-time

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Unexpected server error

object
error
required

Human-readable error summary

string
Example
the request could not be completed