# Generate media and manage assets with the SmallForce CLI

Search before generating so the request matches an enabled model:

```bash
smallforce media models search "animate a product photo" --modality video --json
smallforce media models get <endpointId> --json
```

Build the generation input from the returned schema. For a model with a normal prompt field:

```bash
smallforce media generate <endpointId> \
  --prompt "A ceramic mug on a clean studio table" \
  --wait \
  --out ./mug.png
```

For an image input, upload the local file and use the returned asset ID:

```bash
smallforce assets upload ./product.png --json
smallforce media generate <endpointId> \
  --image <assetId> \
  --input '<json-built-from-inputSchema>' \
  --wait \
  --out ./product-video.mp4
```

Generation is asynchronous. Without `--wait`, the command returns a job. Use `media jobs list` and `media jobs get` to inspect it later. An output path implies waiting and downloads completed output assets.

Do not place local file paths or guessed asset URLs inside model JSON. Use `--image` or repeatable `--asset <field>=<assetId>` mappings. See the complete [media reference](/docs/cli/commands/media) and [assets reference](/docs/cli/commands/assets).
