> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/quick-start.
>
> - Full docs index: https://docs.meshy.ai/llms.txt
> - Single-fetch full content: https://docs.meshy.ai/llms-full.txt
> - Tool-calling access via MCP server: https://docs.meshy.ai/api/ai

---
# Quickstart

<Callout title="Start by creating your API key">
  Every request in this guide needs one. Creating a key takes less than a minute.

  <Button href="https://www.meshy.ai/settings/api" arrow="right" target="_blank" rel="noopener noreferrer">Create your API key</Button>
</Callout>

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

> **Note:** **Using an AI coding assistant?** See our [AI Integration](/api/ai) page — install the Meshy MCP server for tool-calling access from Claude Code, Cursor, Windsurf, and other MCP-compatible tools, or point a plain chat agent at [`llms.txt`](/llms.txt).

---

## <StepNumber>1</StepNumber>Get your API key
<a href="https://www.meshy.ai/settings/api" target="_blank" rel="noopener noreferrer">Create an API key</a> 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](/api/authentication).

![Open API Settings from the API menu, then create your key](/images/api/quick-start/api-key-settings.webp)

> **Note:** **Security tip:** avoid pasting your key directly into scripts — store it as an environment variable instead: `export MESHY_API_KEY="msy_..."`.

---

## <StepNumber>2</StepNumber>Make your first Image-to-3D request
Export your key, then create your first task with [Image to 3D](/api/image-to-3d). Working from a text prompt or multiple photos instead? See [Text to 3D](/api/text-to-3d) or [Multi-Image to 3D](/api/multi-image-to-3d).

**Export your key**

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

> **Note:** Run this in your terminal (Terminal on macOS, Command Prompt or PowerShell on Windows) — not in a browser.

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

<PhotoCard
  src="/images/api/quick-start/source-photo.webp"
  alt="Sample fantasy character illustration used as the Image to 3D input in this guide"
  label="Sample input"
  copyUrl="https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
/>

**cURL**

```bash
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"
  }'
```

```javascript

const headers = { Authorization: `Bearer ${process.env.MESHY_API_KEY}` };

const { data } = await axios.post(
  'https://api.meshy.ai/openapi/v1/image-to-3d',
  { image_url: 'https://docs.meshy.ai/images/api/quick-start/source-photo.webp' },
  { headers },
);

const taskId = data.result;
console.log('Task created:', taskId);
```

```python
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"}

response = requests.post(
    "https://api.meshy.ai/openapi/v1/image-to-3d",
    headers=headers,
    json={"image_url": "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"},
)
response.raise_for_status()
task_id = response.json()["result"]
print("Task created:", task_id)
```

---

## <StepNumber>3</StepNumber>Check 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.

**cURL**

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

```javascript

const headers = { Authorization: `Bearer ${process.env.MESHY_API_KEY}` };

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;
  console.log(task.status, task.progress);
  await new Promise((resolve) => setTimeout(resolve, 5000));
}
```

```python
import os
import time
import requests

headers = {"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"}

while True:
    response = requests.get(
        f"https://api.meshy.ai/openapi/v1/image-to-3d/{task_id}",
        headers=headers,
    )
    response.raise_for_status()
    task = response.json()
    if task["status"] in ("SUCCEEDED", "FAILED"):
        break
    print(task["status"], task["progress"])
    time.sleep(5)
```

**Response — SUCCEEDED**

```json
{
  "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": ""
  }
}
```

> **Note:** Polling not your style? Use [SSE streaming](/api/image-to-3d#stream-an-image-to-3d-task) or a [webhook](/api/webhooks) to get notified the moment a task finishes.

---

## <StepNumber>4</StepNumber>Download 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.

**cURL**

```bash
curl -L "<model_urls.glb from the response above>" -o model.glb
```

```javascript

const { data } = await axios.get(task.model_urls.glb, { responseType: 'arraybuffer' });
fs.writeFileSync('model.glb', data);
```

```python
import requests

response = requests.get(task["model_urls"]["glb"])
response.raise_for_status()

with open("model.glb", "wb") as f:
    f.write(response.content)
```

<PhotoCard
  src="/images/api/quick-start/image-to-3d-output.webp"
  alt="The resulting 3D model generated from the sample fantasy character photo"
  label="Your result"
  aspectRatio="800 / 621"
/>

> **Note:** Files are retained for 3 days on non-Enterprise plans — see [Asset Retention](/api/asset-retention).

### Put it all together

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

```javascript

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');
```

```python
import os
import time
import requests

headers = {"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"}
image_url = "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"

# 1. Create the task
response = requests.post(
    "https://api.meshy.ai/openapi/v1/image-to-3d",
    headers=headers,
    json={"image_url": image_url},
)
response.raise_for_status()
task_id = response.json()["result"]

# 2. Poll until it finishes
while True:
    task = requests.get(
        f"https://api.meshy.ai/openapi/v1/image-to-3d/{task_id}",
        headers=headers,
    ).json()
    if task["status"] in ("SUCCEEDED", "FAILED"):
        break
    time.sleep(5)

# 3. Download the result (only if the task succeeded)
if task["status"] != "SUCCEEDED":
    raise SystemExit(f"Task {task['status']}: {task.get('task_error', {}).get('message', 'unknown error')}")
model = requests.get(task["model_urls"]["glb"])
with open("model.glb", "wb") as f:
    f.write(model.content)
print("Saved model.glb")
```

---

## Explore common workflows
<Cards>
  <Card href="/api/rigging" title="Game-ready character">
Rig a humanoid mesh with a skeleton so it's ready to animate in Unity or Unreal.
  </Card>
  <Card href="/api/image-to-3d#create-an-image-to-3d-task" title="Lowpoly asset">
Set `model_type` to `lowpoly` on Image to 3D for a clean, game-ready mesh.
  </Card>
  <Card href="/api/multi-color-print" title="3D print model">
Convert a finished model into a multi-color 3MF file, ready to slice and print.
  </Card>
</Cards>

---

## Next steps

- Prefer a UI? Try the [API Playground](/api/playground) — configure a request, run it, and copy the generated code.
- Browse the full [API reference](/api) for every endpoint.
- Check [Pricing](/api/pricing), [Rate Limits](/api/rate-limits), and [Errors](/api/errors) before you go to production.
- Watch the [Changelog](/api/changelog) for updates and bug fixes.
- Have feedback or facing issues? Join our [Discord](https://discord.com/invite/KgD5yVM9Y4) community — we'd love to hear from you!
