API Reference

This section provides a detailed reference for all available endpoints and parameters.

Base URL

Base URL: https://api.frame3d.dev

Model Input

The model parameter is required for all rendering endpoints and can be provided in two formats:

1. URL

A publicly accessible URL to a .glb file.

{ "model": "https://example.com/model.glb" }

2. Base64 Data URL

A base64-encoded string of the .glb file.

{ "model": "data:model/gltf-binary;base64,Z2xURg..." }

Error Responses

If a request fails, the API returns a standardized error response:

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "A human-readable error message.",
    "details": "Optional technical details."
  }
}
Error CodeDescription
MISSING_API_KEYNo API key was provided in the request headers.
INVALID_API_KEYThe provided API key is invalid or revoked.
INSUFFICIENT_BALANCEYour account does not have enough credits.
RATE_LIMITEDYou have exceeded the rate limit (default 100/min).
GATEWAY_ERRORAn error occurred in the API gateway.
INVALID_MODELThe provided GLB file is corrupted or invalid.
DOWNLOAD_FAILEDThe API could not download the model from the URL.
RENDER_FAILEDAn unexpected error occurred during rendering.
INVALID_PARAMSThe request body contains invalid parameters.
TIMEOUTThe rendering process exceeded the time limit.
INTERNAL_ERRORA generic server-side error occurred.

Metadata Object

When includeMetadata is set to true in any endpoint, the response will contain a metadata object with the following fields, extracted using @gltf-transform/core.

FieldTypeDescription
trianglesnumberThe total number of triangles in the model.
verticesnumberThe total number of vertices in the model.
meshesnumberThe number of unique mesh objects.
materialsstring[]An array of material names found in the model.
texturesnumberThe number of textures in the model.
fileSizenumberThe original file size of the GLB model in bytes.
isTexturedbooleantrue if any material in the model uses a texture.
animationsarrayAn array of animation objects in the model.

Animation Object

Each animation object in the animations array contains:

FieldTypeDescription
namestringThe name of the animation (or "Unnamed").
durationnumberThe duration of the animation in seconds.
channelsnumberThe number of animation channels in this clip.