> ## Documentation Index
> Fetch the complete documentation index at: https://docs.garmint.app/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Build with Garmint's mockup generation API

# Garmint API

The Garmint API lets you programmatically generate apparel mockups, analyze designs for printability, and access our garment catalog. Perfect for:

* **Print-on-demand platforms** — Generate mockups at scale
* **Design tools** — Integrate mockup preview into your workflow
* **E-commerce** — Auto-generate product images
* **Custom applications** — Build unique experiences with our AI

## Base URL

```
https://garmint.app/api/v1
```

## Quick Example

```bash theme={}
# Generate a mockup
curl -X POST https://garmint.app/api/v1/generate \
  -H "Authorization: Bearer gm_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "designUrl": "https://example.com/my-design.png",
    "garmentId": "gildan-5000",
    "garmentImageUrl": "https://cdn.shopify.com/...",
    "placement": { "x": 50, "y": 35, "scale": 0.8 }
  }'
```

Response:

```json theme={}
{
  "id": "gen_1703001234_abc123",
  "status": "completed",
  "mockupUrl": "https://res.cloudinary.com/.../mockup.jpg",
  "tokensUsed": 1,
  "createdAt": "2024-12-19T12:00:00Z"
}
```

## Features

<CardGroup cols={2}>
  <Card title="Mockup Generation" icon="image" href="/api/endpoints/generate">
    Composite designs onto garments with precise placement control
  </Card>

  <Card title="Design Analysis" icon="magnifying-glass" href="/api/endpoints/analyze">
    Analyze colors, detect complexity, get print recommendations
  </Card>

  <Card title="Garment Catalog" icon="shirt" href="/api/endpoints/garments">
    Browse available blanks with colors, sizes, and print zones
  </Card>

  <Card title="Image Upload" icon="upload" href="/api/endpoints/upload">
    Upload designs and get URLs for generation
  </Card>
</CardGroup>

## Token-Based Pricing

Generations cost **1 token** each. Analysis and uploads are **free**.

| Plan       | Tokens/Month | Price      |
| ---------- | ------------ | ---------- |
| Free       | 50           | \$0        |
| Pro        | 500          | \$29/mo    |
| Business   | 2,000        | \$99/mo    |
| Enterprise | Custom       | Contact us |

<Info>
  Need higher volume? [Contact us](mailto:hello@garmint.app) for custom pricing.
</Info>

## SDKs & Libraries

Coming soon:

* `@garmint/sdk` — TypeScript/JavaScript
* `garmint-py` — Python

For now, use direct REST calls with your preferred HTTP client.

## Getting Started

1. [Create an API key](/api/authentication)
2. [List available garments](/api/endpoints/garments)
3. [Generate your first mockup](/api/endpoints/generate)

## Rate Limits

* **60 requests per minute** per API key
* Rate limit headers included in all responses
* Webhook callbacks don't count against limits

## Support

* **Email**: [api@garmint.app](mailto:api@garmint.app)
* **Discord**: [Join our community](https://discord.com/invite/twbP9uxm)
* **Status**: [status.garmint.app](https://status.garmint.app)
