Skip to content

Format Conversion

Break down barriers between 3D assets in different software and platforms. Supports conversion between GLB, FBX, OBJ, USDZ, and more. Optimized specifically for Web, mobile AR, and 3D printing scenarios.

Typical Application Scenarios

  • AR Adaptation: One-click export to usdz, natively supported by iOS for rapid AR previews.
  • Engine Integration: Convert models to fbx while preserving animation and material info for Unity or Unreal.

API Reference used on this page POST /3d_models/conversions

3D Model Input Formats

Model parameters accept three formats:

  • Previous task result: Use the asset_path from a text/image-to-3D task directly — no re-upload needed
  • Base64 encoding: Pass the raw base64-encoded .glb file content (no data: prefix)
  • Public URL: Any accessible .glb or supported format file link

Basic Examples

bash
curl -X POST 'https://api.v2fun.ai/api/v1/3d_models/conversions' \
  -H 'Authorization: Bearer $V2FUN_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
      "input_model": "models/example.glb",
      "output_format": "string"
    }'
javascript
const response = await fetch('https://api.v2fun.ai/api/v1/3d_models/conversions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer $V2FUN_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "input_model": "models/example.glb",
    "output_format": "string"
  }),
});
const data = await response.json();
python
import requests

resp = requests.post(
    'https://api.v2fun.ai/api/v1/3d_models/conversions',
    headers={
        'Authorization': 'Bearer $V2FUN_API_KEY',
        'Content-Type': 'application/json',
    },
    json={
        "input_model": "models/example.glb",
        "output_format": "string"
    },
)
print(resp.json())
java
import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
String body = "{\"input_model\":\"models/example.glb\",\"output_format\":\"string\"}";
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.v2fun.ai/api/v1/3d_models/conversions"))
    .header("Authorization", "Bearer $V2FUN_API_KEY")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
HttpResponse<String> response = client.send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());

Core Use Cases

Mainstream Format Coverage

Supports export to obj, fbx, glb, stl, usdz, and more. Once the task reaches COMPLETED status, the metadata[].downloads field contains a ready-to-use download URL for the converted file.

output_format: obj · ply · stl · fbx · glb · usdz · 3mf

bash
curl -X POST 'https://api.v2fun.ai/api/v1/3d_models/conversions' \
  -H 'Authorization: Bearer $V2FUN_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
      "input_model": "https://asset.v2fun.ai/upload/retex-input-cat.glb",
      "output_format": "fbx"
    }'
javascript
const response = await fetch('https://api.v2fun.ai/api/v1/3d_models/conversions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer $V2FUN_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "input_model": "https://asset.v2fun.ai/upload/retex-input-cat.glb",
    "output_format": "fbx"
  }),
});
const data = await response.json();
python
import requests

resp = requests.post(
    'https://api.v2fun.ai/api/v1/3d_models/conversions',
    headers={
        'Authorization': 'Bearer $V2FUN_API_KEY',
        'Content-Type': 'application/json',
    },
    json={
        "input_model": "https://asset.v2fun.ai/upload/retex-input-cat.glb",
        "output_format": "fbx"
    },
)
print(resp.json())
java
import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
String body = "{\"input_model\":\"https://asset.v2fun.ai/upload/retex-input-cat.glb\",\"output_format\":\"fbx\"}";
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.v2fun.ai/api/v1/3d_models/conversions"))
    .header("Authorization", "Bearer $V2FUN_API_KEY")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
HttpResponse<String> response = client.send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
json
{
  "task_uuid": "<task_uuid>",
  "task_type": "<task_type>",
  "model": "<model>",
  "status": "<taskstatus>",
  "created_at": 0,
  "completed_at": 0,
  "result": []
}

Get Task Result

json
{
  "status": "COMPLETED",
  "task_uuid": "7bae217c-3029-48c6-b45e-2e013a4b9769",
  "metadata": [
    {
      "model_id": "76cbd40f-b20a-40ea-85fd-c9fdf5ce6ca8",
      "downloads": [
        {
          "asset_path": "models/76cbd40f-b20a-40ea-85fd-c9fdf5ce6ca8.fbx",
          "download_url": "https://asset.v2fun.ai/upload/convert-result-cat.fbx"
        }
      ]
    }
  ]
}