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

# AI content generation

> Generate images, video, audio, and run live web research from the API — the same AI media engine that powers Crevio, available as metered API calls.

**Crevio turns prompts into production media and live web intelligence.** Generate product images, marketing video, voiceovers, and run agentic web research — all through the API, billed per call against your credit balance.

These operations are **metered** (they consume credits — see [Usage & billing](/developer/guides/usage-billing)). Media operations are **asynchronous**: you kick off a job, then poll for the result. Finished media is saved to your **MediaLibrary** as `file_…` ids that you can attach directly to products, posts, and more.

## How generation works

Most media calls don't return the finished asset inline. They start a background **Job** and return a job you poll until it's done.

<Steps>
  <Step title="Start a generation">
    Call `POST /images/generate`, `POST /videos/generate`, or `POST /audio/generate`. You get back a job.
  </Step>

  <Step title="Poll the job">
    Poll `GET /jobs/{id}` (or list with `GET /jobs`) until its status is terminal. The completed job references the resulting MediaLibrary file.
  </Step>

  <Step title="Use the file">
    The output lands in your MediaLibrary as a `file_…` id. Use it anywhere a file is accepted — e.g. a product's `images` array.
  </Step>
</Steps>

<Note>
  Generated media always lands in the MediaLibrary first. You attach the `file_…` id — you never hand a raw CDN URL to a product or post.
</Note>

## Pricing

Per-unit prices in USD. Pick a model with the `model` parameter; omit it to use the default.

### Images

| Model                  | Price               | Notes                                   |
| ---------------------- | ------------------- | --------------------------------------- |
| `fal-ai/flux/schnell`  | \$0.003 / megapixel | Default — fast and cheap                |
| `fal-ai/flux/dev`      | \$0.025 / megapixel | Higher quality                          |
| `fal-ai/flux-pro/v1.1` | \$0.04 / megapixel  | Best quality                            |
| `fal-ai/recraft-v3`    | \$0.04 / image      | Strong typography & vector-style output |

### Video

| Model                                 | Price            |
| ------------------------------------- | ---------------- |
| `kling v1.6 standard` (text-to-video) | \$0.056 / second |
| `kling v1.6 pro` (image-to-video)     | \$0.098 / second |
| `minimax video-01`                    | \$0.50 / video   |
| `luma-dream-machine`                  | \$0.50 / video   |

### Audio (text-to-speech)

| Model                        | Price                          |
| ---------------------------- | ------------------------------ |
| `elevenlabs multilingual-v2` | \$0.10 / 1,000 chars (default) |
| `elevenlabs turbo-v2.5`      | \$0.05 / 1,000 chars           |
| `minimax speech-02-hd`       | \$0.10 / 1,000 chars           |

<Tip>
  Discover the live model lists at `GET /images/models`, `GET /videos/models`, and `GET /audio/models`.
</Tip>

## Images

`POST /images/generate` starts an image generation. The one thing that trips people up: **the prompt goes under `input: { prompt }`**, not at the top level. The `input` object is forwarded verbatim to the underlying model, so any model-specific fields go there too.

<Warning>
  Image generation is the exception to Crevio's "params at the top level" rule. The prompt must be nested under `input`. A top-level `prompt` is ignored.
</Warning>

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.crevio.co/v1/images/generate \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "fal-ai/flux/schnell",
        "input": {
          "prompt": "bold brand hero image for a creative marketing agency, abstract gradient shapes and confident typography, studio lighting"
        }
      }'
    ```
  </Tab>

  <Tab title="SDK (TypeScript)">
    ```typescript theme={null}
    import { Crevio } from "@crevio/sdk";

    const crevio = new Crevio({ apiKeyAuth: "YOUR_API_TOKEN" });

    const job = await crevio.images.generate({
      model: "fal-ai/flux/schnell",
      input: {
        prompt:
          "bold brand hero image for a creative marketing agency, abstract gradient shapes and confident typography, studio lighting",
      },
    });
    ```
  </Tab>

  <Tab title="MCP (agent)">
    ```
    Generate a bold brand hero image for my marketing agency with abstract
    gradient shapes and confident typography, and save it to my library.
    ```
  </Tab>
</Tabs>

The call returns a job. Poll it until it finishes:

```bash theme={null}
curl https://api.crevio.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

When the job completes, the generated image is in your MediaLibrary as a `file_…` id.

### Edit, upscale, and stock

| Operation              | What it does                                          |
| ---------------------- | ----------------------------------------------------- |
| `POST /images/edit`    | Edit an existing image with a prompt (image-to-image) |
| `POST /images/upscale` | Increase resolution of an existing image              |
| `GET /images/stock`    | Search royalty-free stock imagery                     |
| `GET /images/models`   | List available image models                           |

## Video

`POST /videos/generate` follows the same shape family — choose a `model` from `GET /videos/models`, describe what you want, then poll for the result.

```bash theme={null}
curl -X POST https://api.crevio.co/v1/videos/generate \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling v1.6 standard",
    "input": {
      "prompt": "energetic social banner clip for a personal fitness coach, dynamic motion graphics over a vibrant gradient backdrop"
    }
  }'
```

Poll `GET /videos/{id}` (or `GET /jobs/{id}`) until the render is done. Video can take a while — these are long-running jobs.

## Audio (text-to-speech)

`POST /audio/generate` turns text into a voiceover. Pricing is per 1,000 characters, so pass the text you want spoken.

```bash theme={null}
curl -X POST https://api.crevio.co/v1/audio/generate \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "elevenlabs multilingual-v2",
    "input": {
      "text": "Welcome to your free consultation. In this first call we will map out your goals."
    }
  }'
```

Poll `GET /audio/{id}` for the finished audio file.

## Web tools

Beyond media, Crevio exposes a suite of **live web** operations — the same tools your AI Tasks use to research the open web. All are metered.

| Endpoint             | What it does                                          |
| -------------------- | ----------------------------------------------------- |
| `POST /web/search`   | Run a web search and return ranked results            |
| `POST /web/read`     | Fetch and clean a single URL into readable text       |
| `POST /web/map`      | Map the URLs/structure of a site                      |
| `POST /web/crawl`    | Crawl a site and collect its pages                    |
| `POST /web/extract`  | Pull structured data from one or more pages           |
| `POST /web/research` | Agentic multi-step research with a synthesized answer |

`POST /web/research` is the heavyweight: give it a `query` and a `depth`, and it fans out searches, reads sources, and synthesizes a cited answer.

```bash theme={null}
curl -X POST https://api.crevio.co/v1/web/research \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "freelance web design pricing benchmarks 2026",
    "depth": "thorough"
  }'
```

The `depth` enum controls how hard it digs — at the cost of more credits and time:

| `depth`      | Behavior                      |
| ------------ | ----------------------------- |
| `quick`      | Fast, shallow pass (default)  |
| `thorough`   | Broader fan-out, more sources |
| `exhaustive` | Deep, multi-round research    |

## Worked example: generate a product image and attach it

A common flow — create a draft product, generate a cover image, and attach it.

<Steps>
  <Step title="Create a draft product">
    ```bash theme={null}
    curl -X POST https://api.crevio.co/v1/products \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "name": "Strategy Consulting Session", "status": "draft" }'
    ```

    Returns the product (e.g. `"id": "prod_abc123"`).
  </Step>

  <Step title="Generate the cover image">
    ```bash theme={null}
    curl -X POST https://api.crevio.co/v1/images/generate \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "input": {
          "prompt": "polished professional brand shot of a business consultant at a desk, warm office light, on a clean background"
        }
      }'
    ```

    Returns a job — note its id.
  </Step>

  <Step title="Poll until the image is ready">
    ```bash theme={null}
    curl https://api.crevio.co/v1/jobs/JOB_ID \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    ```

    When complete, the job references a MediaLibrary file (e.g. `file_def456`).
  </Step>

  <Step title="Attach the file to the product">
    ```bash theme={null}
    curl -X PATCH https://api.crevio.co/v1/products/prod_abc123 \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "images": ["file_def456"] }'
    ```

    The first id in `images` becomes the cover. An empty array clears the gallery.
  </Step>
</Steps>

<Tip>
  Want the whole thing in one breath? Over [MCP](/developer/mcp) you can just ask: "Generate a cover image for my Strategy Consulting Session and set it as the product photo."
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Launch a paid course" icon="graduation-cap" href="/developer/guides/recipe-launch-paid-course">
    Chain products, pricing, and checkout end to end.
  </Card>

  <Card title="Tasks" icon="robot" href="/developer/guides/tasks">
    Hand web research and content jobs to your AI workforce.
  </Card>

  <Card title="Usage & billing" icon="credit-card" href="/developer/guides/usage-billing">
    How metered credits are consumed per call.
  </Card>

  <Card title="Conventions" icon="list-check" href="/developer/guides/conventions">
    The rules every endpoint follows.
  </Card>
</CardGroup>
