Download a character | Uthana API Docs

On this page

Download a character file in FBX or GLB format using the character bundle endpoint.

Step 1: Get the character ID

Use the character ID from your upload response or list it via the API.

Step 2: Download the character file

API_KEY="your-api-key"
CHARACTER_ID="your-character-id"

# FBX
curl -L "https://uthana.com/motion/bundle/$CHARACTER_ID/character.fbx" \
  -u $API_KEY: \
  -o character.fbx

# GLB
curl -L "https://uthana.com/motion/bundle/$CHARACTER_ID/character.glb" \
  -u $API_KEY: \
  -o character.glb
import asyncio
from uthana import Uthana

client = Uthana("your-api-key")
CHARACTER_ID = "your-character-id"

async def main():
    glb_data = await client.characters.download(CHARACTER_ID, output_format="glb")
    with open("character.glb", "wb") as f:
        f.write(glb_data)

# FBX
    fbx_data = await client.characters.download(CHARACTER_ID, output_format="fbx")
    with open("character.fbx", "wb") as f:
        f.write(fbx_data)

asyncio.run(main())
import { UthanaClient } from "@uthana/client";

const client = new UthanaClient(process.env.UTHANA_API_KEY!);
const CHARACTER_ID = "your-character-id";

const buffer = await client.characters.download(CHARACTER_ID);

// Node.js: write to disk
import { writeFileSync } from "fs";
writeFileSync("character.glb", Buffer.from(buffer));

// Browser: create a download link
const url = URL.createObjectURL(new Blob([buffer], { type: "model/gltf-binary" }));
import { useUthanaClient } from "@uthana/react";

function DownloadCharacterButton({ characterId }: { characterId: string }) {
  const client = useUthanaClient();

async function download() {
    const buffer = await client.characters.download(characterId);
    const url = URL.createObjectURL(new Blob([buffer], { type: "model/gltf-binary" }));
    const a = document.createElement("a");
    a.href = url;
    a.download = "character.glb";
    a.click();
  }

return <button onClick={download}>Download character</button>;
}
var apiKey = "your-api-key";
var characterId = "your-character-id";

var downloadUrl = $"https://uthana.com/motion/bundle/{characterId}/character.glb";

var authValue = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{apiKey}:"));
_httpClient.DefaultRequestHeaders.Authorization =
    new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authValue);

var bytes = await _httpClient.GetByteArrayAsync(downloadUrl);