PiAPI
HomeWorkspace
HomeWorkspace
Join Discord
  1. Trellis
  • Get Started
    • Overview
    • Quickstart
    • Make Instruction: How to Use PiAPI to Build a Workflow on Make?
  • Endpoints
    • Song(Udio)
      • Song API Task Creation Examples
      • [Udio] Song Extend
      • Get Task
      • Create Task
      • [Udio] Generate Lyrics
    • Kling
      • Lipsync With PiAPI Kling API Examples
      • Motion Brush With PiAPI Kling API Example
      • Kling Elements Video Generation API
      • Kling Effects Video Generation
      • Cancel Task
        • Cancel Tasks
        • Cancel Task
      • Get Task
      • Create Task
      • Kling Virtual Try-On
    • Hailuo
      • Hailuo Director Mode Example
      • Generate Video
      • Get Task
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Text to Image
        • Image to Image
      • Get task
    • AI Hug
      • Get Task
      • Create Task
    • LLM
      • Use Cases for GPT-4o Image API
      • How To Avoid Timeouts in Completion API
      • GPT-4o Image Generation API
      • LLM API | Basic Completions
      • Get Task
    • Midjourney
      • PiAPI Penalties on Midjourney Usage
      • Detailed Explaination on Midjourney Task Result
      • Midjourney V7 API Instructions
      • Create Task
        • Imagine
        • Upscale
        • Variation
        • Reroll
        • Describe
        • Seed
        • Blend
        • Inpaint
        • Outpaint
        • Pan
      • Cancel Task
        • Cancel Task
        • Cancel Tasks
      • Get Task
    • Faceswap
      • Multi Faceswap
      • Image Faceswap
      • Video Faceswap
      • Get Task
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Create Task
        POST
      • Get Task
        GET
    • Luma Dream Machine
      • Cancel Task
        • Cancel Tasks
        • Cancel Task
      • Create Task
      • Get Task
    • WanX
      • Available LoRA Types for Wanx
      • Generate WanX Task with LoRA Using PiAPI
      • Use Cases for Wanx LoRA
      • Create Task
      • Get Task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Get Task
      • Generate Video
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
      • Get Task
    • Tools
      • File Upload API
      • Video Upscale
      • Video Upscale-Get Task
      • Remove Background API
      • Remove Background-Get Task
      • Segment With Prompt API
      • Segment With Prompt API-Get Task
      • Image Upscale(Super Resolution) API
      • Image Upscale-Get Task
    • PiAPI Account Management
      • PiAPI Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Bulk Generation Service
    • Billings
    • PiAPI MCP Server
    • Workspace Manual
      • Host-your-account (HYA) | Back-up Account
      • Host-your-account (HYA) | Debug Checklist
      • Host-your-account (HYA) | Connected Account Status
    • Announcements
      • PiAPI 2025 January 1st Pricing Update
  • Legacy Documentation
    • Midjourney
      • Midjourney Webhook
      • Imagine
      • Reroll
      • Upscale
      • Variation
      • Inpaint
      • Outpaint
      • Pan
      • Describe
      • Blend
      • Seed
      • Fetch
      • Multi Fetch
      • Cancel
    • Face Swap
      • Video Faceswap
      • Multi-face-swap
      • Fetch
    • Dream Machine
      • Video Generation
      • Video Extend
      • Get Video Generation
    • Kling
      • Video Generation
      • Video Extend
      • Get Video Generation
  1. Trellis

Create Task

POST
/api/v1/task
INFO

Trellis 3D API#

The Create Task Endpoint for Trellis 3D Model Generation!
We've supported task_types including text-to-3D and image-to-3D to fit users' need better.
Deploying the official Trellis3D project from Microsoft Research
$0.04 per generation

Request

Header Params
x-api-key
string 
required
your api key
Body Params application/json
optional
One of
model
enum<string> 
required
Model name
Allowed value:
Qubico/trellis
task_type
enum<string> 
required
Task type
Allowed value:
text-to-3d
input
object 
required
config
object 
optional
Example
{
  "model": "Qubico/trellis",
  "task_type": "text-to-3d",
  "input": {
    "prompt": "string",
    "ss_sampling_steps": 0,
    "slat_sampling_steps": 0,
    "ss_guidance_strength": 0,
    "slat_guidance_strength": 0,
    "seed": 0
  },
  "config": {
    "webhook_config": {
      "endpoint": "string",
      "secret": "string"
    }
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "Qubico/trellis",
    "task_type": "text-to-3d",
    "input": {
        "prompt": "string",
        "ss_sampling_steps": 0,
        "slat_sampling_steps": 0,
        "ss_guidance_strength": 0,
        "slat_guidance_strength": 0,
        "seed": 0
    },
    "config": {
        "webhook_config": {
            "endpoint": "string",
            "secret": "string"
        }
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
  "completed_at": "2024-12-11T12:50:29.319432+00:00",
  "created_at": null,
  "error": null,
  "id": null,
  "input": {
    "generate_color": true,
    "generate_model": true,
    "generate_normal": true,
    "image": "https://i.ibb.co/NY6W1r6/trellis.png",
    "mesh_simplify": 0.9,
    "randomize_seed": true,
    "seed": 0,
    "slat_guidance_strength": 3,
    "slat_sampling_steps": 50,
    "ss_guidance_strength": 7.5,
    "ss_sampling_steps": 50,
    "texture_size": 1024
  },
  "logs": "INFO:predict:Loading and preprocessing input image...\nINFO:predict:Saved image without background\nINFO:predict:Using randomized seed: 996765520\nINFO:predict:Running TRELLIS pipeline...\nSampling:   0%|          | 0/50 [00:00<?, ?it/s]\nSampling:   2%|▏         | 1/50 [00:00<00:09,  5.43it/s]\nSampling:   4%|▍         | 2/50 [00:00<00:10,  4.79it/s]\nSampling:   6%|▌         | 3/50 [00:00<00:10,  4.67it/s]\nSampling:   8%|▊         | 4/50 [00:00<00:09,  4.60it/s]\nSampling:  10%|█         | 5/50 [00:01<00:09,  4.57it/s]\nSampling:  12%|█▏        | 6/50 [00:01<00:09,  4.54it/s]\nSampling:  14%|█▍        | 7/50 [00:01<00:09,  4.53it/s]\nSampling:  16%|█▌        | 8/50 [00:01<00:09,  4.52it/s]\nSampling:  18%|█▊        | 9/50 [00:01<00:09,  4.52it/s]\nSampling:  20%|██        | 10/50 [00:02<00:08,  4.51it/s]\nSampling:  22%|██▏       | 11/50 [00:02<00:08,  4.49it/s]\nSampling:  24%|██▍       | 12/50 [00:02<00:08,  4.49it/s]\nSampling:  26%|██▌       | 13/50 [00:02<00:08,  4.49it/s]\nSampling:  28%|██▊       | 14/50 [00:03<00:08,  4.49it/s]\nSampling:  30%|███       | 15/50 [00:03<00:07,  4.48it/s]\nSampling:  32%|███▏      | 16/50 [00:03<00:07,  4.48it/s]\nSampling:  34%|███▍      | 17/50 [00:03<00:07,  4.49it/s]\nSampling:  36%|███▌      | 18/50 [00:03<00:07,  4.48it/s]\nSampling:  38%|███▊      | 19/50 [00:04<00:06,  4.48it/s]\nSampling:  40%|████      | 20/50 [00:04<00:06,  4.48it/s]\nSampling:  42%|████▏     | 21/50 [00:04<00:06,  4.49it/s]\nSampling:  44%|████▍     | 22/50 [00:04<00:06,  4.48it/s]\nSampling:  46%|████▌     | 23/50 [00:05<00:06,  4.48it/s]\nSampling:  48%|████▊     | 24/50 [00:05<00:05,  4.48it/s]\nSampling:  50%|█████     | 25/50 [00:05<00:05,  4.48it/s]\nSampling:  52%|█████▏    | 26/50 [00:05<00:05,  4.48it/s]\nSampling:  54%|█████▍    | 27/50 [00:05<00:05,  4.48it/s]\nSampling:  56%|█████▌    | 28/50 [00:06<00:04,  4.48it/s]\nSampling:  58%|█████▊    | 29/50 [00:06<00:04,  4.48it/s]\nSampling:  60%|██████    | 30/50 [00:06<00:04,  4.48it/s]\nSampling:  62%|██████▏   | 31/50 [00:06<00:04,  4.48it/s]\nSampling:  64%|██████▍   | 32/50 [00:07<00:04,  4.48it/s]\nSampling:  66%|██████▌   | 33/50 [00:07<00:03,  4.47it/s]\nSampling:  68%|██████▊   | 34/50 [00:07<00:03,  4.47it/s]\nSampling:  70%|███████   | 35/50 [00:07<00:03,  4.47it/s]\nSampling:  72%|███████▏  | 36/50 [00:07<00:03,  4.47it/s]\nSampling:  74%|███████▍  | 37/50 [00:08<00:02,  4.47it/s]\nSampling:  76%|███████▌  | 38/50 [00:08<00:02,  4.47it/s]\nSampling:  78%|███████▊  | 39/50 [00:08<00:02,  5.26it/s]\nSampling:  80%|████████  | 40/50 [00:08<00:01,  6.01it/s]\nSampling:  82%|████████▏ | 41/50 [00:08<00:01,  6.66it/s]\nSampling:  84%|████████▍ | 42/50 [00:08<00:01,  7.21it/s]\nSampling:  86%|████████▌ | 43/50 [00:08<00:00,  7.66it/s]\nSampling:  88%|████████▊ | 44/50 [00:09<00:00,  8.00it/s]\nSampling:  90%|█████████ | 45/50 [00:09<00:00,  8.27it/s]\nSampling:  92%|█████████▏| 46/50 [00:09<00:00,  8.46it/s]\nSampling:  94%|█████████▍| 47/50 [00:09<00:00,  8.59it/s]\nSampling:  96%|█████████▌| 48/50 [00:09<00:00,  8.71it/s]\nSampling:  98%|█████████▊| 49/50 [00:09<00:00,  8.78it/s]\nSampling: 100%|██████████| 50/50 [00:09<00:00,  8.82it/s]\nSampling: 100%|██████████| 50/50 [00:09<00:00,  5.11it/s]\nSampling:   0%|          | 0/50 [00:00<?, ?it/s]\nSampling:   2%|▏         | 1/50 [00:02<02:26,  2.99s/it]\nSampling:   4%|▍         | 2/50 [00:03<01:07,  1.41s/it]\nSampling:   6%|▌         | 3/50 [00:03<00:42,  1.11it/s]\nSampling:   8%|▊         | 4/50 [00:03<00:30,  1.50it/s]\nSampling:  10%|█         | 5/50 [00:04<00:24,  1.87it/s]\nSampling:  12%|█▏        | 6/50 [00:04<00:20,  2.19it/s]\nSampling:  14%|█▍        | 7/50 [00:04<00:17,  2.46it/s]\nSampling:  16%|█▌        | 8/50 [00:05<00:15,  2.68it/s]\nSampling:  18%|█▊        | 9/50 [00:05<00:14,  2.84it/s]\nSampling:  20%|██        | 10/50 [00:05<00:13,  2.97it/s]\nSampling:  22%|██▏       | 11/50 [00:06<00:12,  3.06it/s]\nSampling:  24%|██▍       | 12/50 [00:06<00:12,  3.13it/s]\nSampling:  26%|██▌       | 13/50 [00:06<00:11,  3.18it/s]\nSampling:  28%|██▊       | 14/50 [00:06<00:11,  3.21it/s]\nSampling:  30%|███       | 15/50 [00:07<00:10,  3.24it/s]\nSampling:  32%|███▏      | 16/50 [00:07<00:10,  3.26it/s]\nSampling:  34%|███▍      | 17/50 [00:07<00:10,  3.27it/s]\nSampling:  36%|███▌      | 18/50 [00:08<00:09,  3.28it/s]\nSampling:  38%|███▊      | 19/50 [00:08<00:09,  3.28it/s]\nSampling:  40%|████      | 20/50 [00:08<00:09,  3.29it/s]\nSampling:  42%|████▏     | 21/50 [00:09<00:08,  3.29it/s]\nSampling:  44%|████▍     | 22/50 [00:09<00:08,  3.29it/s]\nSampling:  46%|████▌     | 23/50 [00:09<00:08,  3.29it/s]\nSampling:  48%|████▊     | 24/50 [00:09<00:07,  3.30it/s]\nSampling:  50%|█████     | 25/50 [00:10<00:07,  3.30it/s]\nSampling:  52%|█████▏    | 26/50 [00:10<00:07,  3.29it/s]\nSampling:  54%|█████▍    | 27/50 [00:10<00:06,  3.29it/s]\nSampling:  56%|█████▌    | 28/50 [00:11<00:06,  3.29it/s]\nSampling:  58%|█████▊    | 29/50 [00:11<00:06,  3.29it/s]\nSampling:  60%|██████    | 30/50 [00:11<00:06,  3.29it/s]\nSampling:  62%|██████▏   | 31/50 [00:12<00:05,  3.29it/s]\nSampling:  64%|██████▍   | 32/50 [00:12<00:05,  3.29it/s]\nSampling:  66%|██████▌   | 33/50 [00:12<00:05,  3.29it/s]\nSampling:  68%|██████▊   | 34/50 [00:13<00:04,  3.29it/s]\nSampling:  70%|███████   | 35/50 [00:13<00:04,  3.29it/s]\nSampling:  72%|███████▏  | 36/50 [00:13<00:04,  3.30it/s]\nSampling:  74%|███████▍  | 37/50 [00:13<00:03,  3.30it/s]\nSampling:  76%|███████▌  | 38/50 [00:14<00:03,  3.30it/s]\nSampling:  78%|███████▊  | 39/50 [00:14<00:02,  3.88it/s]\nSampling:  80%|████████  | 40/50 [00:14<00:02,  4.42it/s]\nSampling:  82%|████████▏ | 41/50 [00:14<00:01,  4.90it/s]\nSampling:  84%|████████▍ | 42/50 [00:14<00:01,  5.31it/s]\nSampling:  86%|████████▌ | 43/50 [00:14<00:01,  5.63it/s]\nSampling:  88%|████████▊ | 44/50 [00:15<00:01,  5.88it/s]\nSampling:  90%|█████████ | 45/50 [00:15<00:00,  6.07it/s]\nSampling:  92%|█████████▏| 46/50 [00:15<00:00,  6.21it/s]\nSampling:  94%|█████████▍| 47/50 [00:15<00:00,  6.31it/s]\nSampling:  96%|█████████▌| 48/50 [00:15<00:00,  6.38it/s]\nSampling:  98%|█████████▊| 49/50 [00:15<00:00,  6.43it/s]\nSampling: 100%|██████████| 50/50 [00:16<00:00,  6.47it/s]\nSampling: 100%|██████████| 50/50 [00:16<00:00,  3.12it/s]\nINFO:predict:TRELLIS pipeline complete!\nINFO:predict:Available output formats: dict_keys(['mesh', 'gaussian'])\nINFO:predict:Starting video rendering...\nINFO:predict:Generating color video from gaussian output...\nRendering: 0it [00:00, ?it/s]\nRendering: 18it [00:00, 173.86it/s]\nRendering: 41it [00:00, 205.90it/s]\nRendering: 65it [00:00, 217.88it/s]\nRendering: 89it [00:00, 223.56it/s]\nRendering: 112it [00:00, 224.36it/s]\nRendering: 120it [00:00, 218.59it/s]\nINFO:predict:Available gaussian render types: ['color', 'depth']\nINFO:predict:Generating normal video from mesh output...\nRendering: 0it [00:00, ?it/s]\nRendering: 9it [00:00, 80.92it/s]\nRendering: 18it [00:00, 82.59it/s]\nRendering: 27it [00:00, 82.89it/s]\nRendering: 36it [00:00, 83.16it/s]\nRendering: 45it [00:00, 83.28it/s]\nRendering: 54it [00:00, 83.36it/s]\nRendering: 63it [00:00, 83.48it/s]\nRendering: 72it [00:00, 83.70it/s]\nRendering: 81it [00:00, 84.09it/s]\nRendering: 90it [00:01, 84.47it/s]\nRendering: 99it [00:01, 84.77it/s]\nRendering: 108it [00:01, 84.94it/s]\nRendering: 117it [00:01, 84.79it/s]\nRendering: 120it [00:01, 83.97it/s]\nINFO:predict:Available mesh render types: ['normal']\nINFO:predict:Combining color and normal videos side by side...\nINFO:predict:Generated combined video successfully\nINFO:predict:Video rendering complete!\nINFO:predict:Generating GLB model...\nINFO- Loaded 22799 vertices and 45238 faces.\n0% done\n2% done\n4% done\n7% done\n9% done\n12% done\n14% done\n17% done\n19% done\n21% done\n24% done\n26% done\n29% done\n31% done\n34% done\n36% done\n39% done\n41% done\n43% done\n46% done\n48% done\n51% done\n53% done\n56% done\n58% done\n60% done\n63% done\n65% done\n68% done\n70% done\n73% done\n75% done\n78% done\n80% done\n82% done\n85% done\n87% done\n90% done\n92% done\n95% done\n97% done\n100% done\nRendering: 0it [00:00, ?it/s]\nRendering: 12it [00:00, 114.93it/s]\nRendering: 25it [00:00, 120.87it/s]\nRendering: 38it [00:00, 120.73it/s]\nRendering: 51it [00:00, 117.82it/s]\nRendering: 63it [00:00, 114.63it/s]\nRendering: 75it [00:00, 113.92it/s]\nRendering: 87it [00:00, 113.96it/s]\nRendering: 99it [00:00, 114.14it/s]\nRendering: 100it [00:00, 115.41it/s]\nINFO:predict:GLB model generation complete!\nINFO:predict:Prediction complete! Returning results...\n",
  "metrics": {
    "predict_time": 78.858637
  },
  "output": {
    "no_background_image": "",
    "combined_video": "",
    "model_file": ""
  },
  "started_at": "2024-12-11T12:49:10.460795+00:00",
  "status": "succeeded",
  "version": null
}
Modified at 2025-04-27 03:28:11
Previous
Get Task
Next
Get Task