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

# Describe It: Generate a Pipeline

> Describe what you want to retrieve in plain words, and get back a validated manifest with its models, extractors and retriever, plus a cost estimate.

`POST /v1/manifest/generate` takes a plain-words description of what you want to retrieve. It returns a [manifest](https://docs.mixpeek.com/docs/operations/manifests.md): the buckets, collections, extractors and retriever that do the job, written as YAML you can review and apply.

## What the generator does

**1. Reads the live catalogs**

The model that writes the manifest is given the current extractor and retriever-stage catalogs to choose from.

**2. Validates its own answer**

The draft goes through the same checks as `POST /v1/manifest/validate`. When those checks find errors, the model sees them and repairs its answer, up to 2 times.

**3. Prices and matches it**

The response prices the manifest at list rates and names the closest [namespace templates](https://mixpeek.com/templates) and [catalog models](https://mixpeek.com/models).

## Generate a manifest

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/manifest/generate" \
  -H "Authorization: Bearer $MP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Search our product videos by what is shown and said, and find every scene with our logo",
    "manifest_name": "product-video-search"
  }'
```

```python Python theme={null}
import os
import requests

resp = requests.post(
    "https://api.mixpeek.com/v1/manifest/generate",
    headers={"Authorization": f"Bearer {os.environ['MP_API_KEY']}"},
    json={
        "description": "Search our product videos by what is shown and said, "
        "and find every scene with our logo",
        "manifest_name": "product-video-search",
    },
)
result = resp.json()
print(result["validation"])
print(result["manifest"])
```

```javascript JavaScript theme={null}
const resp = await fetch("https://api.mixpeek.com/v1/manifest/generate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    description:
      "Search our product videos by what is shown and said, and find every scene with our logo",
    manifest_name: "product-video-search",
  }),
});
const result = await resp.json();
console.log(result.validation, result.manifest);
```

### Request fields

**description** `string` *required*

What the namespace should do, in plain words.

**manifest\_name** `string` (default: generated-manifest)

Written to `metadata.name` in the manifest.

**inventory** `object`

Files per bucket name the manifest will declare. With it, the response carries a `quote` for indexing those files.

**queries\_per\_month** `integer` (default: 0)

Used for the monthly price in `quote`.

### Response fields

**manifest** `string`

The manifest, as YAML.

**validation** `object`

`valid`, `errors` and `warnings`, from the same checks as validate. When `valid` is `false` after the repair rounds, the errors are still listed so you can fix them by hand.

**repair\_rounds** `integer`

How many times the model repaired its answer, 0 to 2.

**cost\_estimate** `object`

The manifest priced at list rates: per 1,000 items, and per month at the volume stated in its `monthly_volume` field.

**suggested** `object`

`templates` and `models`: the namespace templates and catalog models the generator was offered as the closest matches to your description.

**quote** `object`

Present when you send `inventory`. The indexing charge for those files, the monthly price and the unit prices, the same quote `POST /v1/organizations/billing/estimate` returns for this manifest. A bucket in `inventory` that the manifest does not declare is reported in `quote.error`.

## Review and apply

**1. Read the manifest**

Check the extractors and the retriever stages against what you described. Edit the YAML where it differs.

**2. Dry run**

Call `POST /v1/manifest/apply` with `dry_run=true`. The response lists what would be created, in dependency order, and creates nothing.

**3. Apply**

Call `POST /v1/manifest/apply`. It creates the resources and returns the result, or a task to poll.

Once the retriever runs, [Auto-Tune](https://docs.mixpeek.com/docs/retrieval/auto-tune.md) adapts its fusion weights to how people use the results.

> [card] [Manifests](https://docs.mixpeek.com/docs/operations/manifests.md)
>
> The full manifest format and the authoring loop.

> [card] [Auto-Tune](https://docs.mixpeek.com/docs/retrieval/auto-tune.md)
>
> Fusion weights that adapt from interactions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.