Quickstart

Start by creating your API key

Every request in this guide needs one. Creating a key takes less than a minute.

Create your API key

Four steps to your first 3D model, using the Meshy REST API.


1Get your API key

Create an API key from your account settings — you won't be able to view it again after this screen, so store it somewhere safe. Every request authenticates with a Bearer token in the Authorization header — see Authentication.

Open API Settings from the API menu, then create your key


2Make your first Image-to-3D request

Export your key, then create your first task with Image to 3D. Working from a text prompt or multiple photos instead? See Text to 3D or Multi-Image to 3D.

Export your key

export MESHY_API_KEY="<your-api-key>"

Every example below uses this photo — swap in your own image_url to try something else.

Sample fantasy character illustration used as the Image to 3D input in this guide
Sample input

Request

POST
/openapi/v1/image-to-3d
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
  }'

3Check task status

Requests return a task ID immediately. Poll the same endpoint until status is SUCCEEDED — replace <task_id> below with the ID returned in step 2.

Request

GET
/openapi/v1/image-to-3d/:id
curl https://api.meshy.ai/openapi/v1/image-to-3d/<task_id> \
  -H "Authorization: Bearer ${MESHY_API_KEY}"

Response — SUCCEEDED

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "status": "SUCCEEDED",
  "progress": 100,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "task_error": {
    "message": ""
  }
}

4Download your model

Grab the model from model_urls in the response above. Each format (GLB, FBX, OBJ, USDZ, STL) is a signed, time-limited URL — or skip the command line and paste the URL directly into your browser's address bar to download it.

Download

model_urls.glb
curl -L "<model_urls.glb from the response above>" -o model.glb
The resulting 3D model generated from the sample fantasy character photo
Your result

Put it all together

Prefer one script that does the whole thing — create, poll, download?

Full script

import axios from 'axios';
import fs from 'fs';

const headers = { Authorization: `Bearer ${process.env.MESHY_API_KEY}` };
const imageUrl = 'https://docs.meshy.ai/images/api/quick-start/source-photo.webp';

// 1. Create the task
const { data: created } = await axios.post(
  'https://api.meshy.ai/openapi/v1/image-to-3d',
  { image_url: imageUrl },
  { headers },
);
const taskId = created.result;

// 2. Poll until it finishes
let task;
while (true) {
  const { data } = await axios.get(`https://api.meshy.ai/openapi/v1/image-to-3d/${taskId}`, { headers });
  task = data;
  if (task.status === 'SUCCEEDED' || task.status === 'FAILED') break;
  await new Promise((resolve) => setTimeout(resolve, 5000));
}

// 3. Download the result (only if the task succeeded)
if (task.status !== 'SUCCEEDED') {
  throw new Error(`Task ${task.status}: ${task.task_error?.message || 'unknown error'}`);
}
const { data: model } = await axios.get(task.model_urls.glb, { responseType: 'arraybuffer' });
fs.writeFileSync('model.glb', model);
console.log('Saved model.glb');

Explore common workflows


Next steps

  • Prefer a UI? Try the API Playground — configure a request, run it, and copy the generated code.
  • Browse the full API reference for every endpoint.
  • Check Pricing, Rate Limits, and Errors before you go to production.
  • Watch the Changelog for updates and bug fixes.
  • Have feedback or facing issues? Join our Discord community — we'd love to hear from you!