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

# Media Gen

> Unified media generation for autonomous agents. Gemini-compatible GenerateContent for text/multimodal calls; image/media generation routes. One API key, two modalities.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/media-gen)

**AI-powered media generation for autonomous agents.** One `AISA_API_KEY` unlocks Gemini-compatible GenerateContent and image/media generation routes.

## Install

First, install the AIsa CLI if you have not already:

```bash theme={null}
npm install -g @aisa-one/cli
```

Then install the skill:

```bash theme={null}
aisa skills install media-gen
```

## What can agents do with it?

<CardGroup cols={2}>
  <Card title="Marketing creatives" icon="palette">
    "Generate a cinematic hero image for a product launch deck."
  </Card>

  <Card title="Social content" icon="hashtag">
    "Create social-ready image variations for the next post."
  </Card>

  <Card title="Storyboarding" icon="film">
    "Produce 6 key frames illustrating the happy path of a user journey."
  </Card>

  <Card title="Reference images" icon="image">
    "Use this static mock as visual context for a generated creative."
  </Card>

  <Card title="Photorealism" icon="camera">
    "8k ultra-detailed cyberpunk skyline with neon rain."
  </Card>

  <Card title="Agent reports" icon="chart-simple">
    "Generate visual illustrations for a research report agent."
  </Card>
</CardGroup>

## Core capabilities

* **Gemini-compatible generation** — use `POST /v1beta/models/{model}:generateContent` with a verified model such as `gemini-3.5-flash` for native Gemini-format content generation.

## Quick start

```bash theme={null}
export AISA_API_KEY="your-key"
```

### Gemini-compatible generation

```bash theme={null}
curl -X POST "https://api.aisa.one/v1beta/models/gemini-3.5-flash:generateContent" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {"role": "user", "parts": [{"text": "Return exactly: ok"}]}
    ],
    "generationConfig": {"maxOutputTokens": 16}
  }'
```

The response follows the Gemini `GenerateContentResponse` shape, with generated text in `candidates[0].content.parts[0].text`.

## Endpoint reference

| Endpoint                                 | Method | Purpose                                                             |
| ---------------------------------------- | ------ | ------------------------------------------------------------------- |
| `/v1beta/models/{model}:generateContent` | POST   | [Gemini-compatible generation](/api-reference/chat/generatecontent) |

## Get started

1. Sign up at [aisa.one](https://aisa.one) (new accounts start with \$2 free credit).
2. Generate an API key from the console.
3. `export AISA_API_KEY="your-key"` and install the skill:
   ```bash theme={null}
   npm install -g @aisa-one/cli
   aisa skills install media-gen
   ```

## Related

<CardGroup cols={3}>
  <Card title="Gemini generateContent" icon="google" href="/api-reference/chat/generatecontent">
    Gemini-compatible generation endpoint reference.
  </Card>
</CardGroup>
