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

# API Reference

> Shared conventions for AI Gen Studio Image API endpoints.

The AI Gen Studio Image API is versioned under:

```txt theme={"theme":{"light":"github-light","dark":"github-light"}}
https://aigenstudio.app/api/v1
```

All create endpoints are asynchronous and return a `job` object. Use `GET /jobs/{jobId}` to read result status.

## Authentication

Send your API key as a Bearer token:

```bash theme={"theme":{"light":"github-light","dark":"github-light"}}
Authorization: Bearer aigs_live_...
```

`GET /tools` is public. Create, list, and status endpoints require an API key.

## Required headers

| Header            | Required for          | Purpose                               |
| ----------------- | --------------------- | ------------------------------------- |
| `Authorization`   | all private endpoints | API key authentication.               |
| `Idempotency-Key` | all create endpoints  | Safe retries for one logical request. |
| `X-Request-Id`    | optional              | Client correlation id.                |

## Create responses

```json theme={"theme":{"light":"github-light","dark":"github-light"}}
{
  "job": {
    "id": "f693e677-51e0-4ebe-80a0-ad06acbc4443",
    "api": "ad_creative",
    "status": "queued",
    "sandbox": true,
    "total_results": 1,
    "credits_reserved": 0,
    "created_at": "2026-06-28T10:30:00.000Z"
  },
  "remaining_paid_credits": 0,
  "request_id": "req_abc123"
}
```

A repeated request with the same `Idempotency-Key` and same body returns the same job. The same key with a different body returns `409 idempotency_conflict`.
