# Media & Web

Source: https://docs.autessa.com/docs/tools/media-web

> Tool types for stock media, live web search, scraping, audio extraction, and transcription.

# Media & Web

Give agents eyes and ears on the outside world: search the live web, scrape pages, fetch files and images into the conversation, source stock media, and turn audio and video into text.

None of these types require a connector. The live search and scrape tools are metered per company; outputs that produce files land in Autessa-managed S3 storage and come back as short-lived presigned or tiny URLs.

## Extract Audio **TOOL** `EXTRACT_AUDIO`

Downloads the media at `videoFileUrl` (an `http(s)` link, such as a presigned URL), transcodes its audio track to WAV, and uploads the result to Autessa storage under your company. The defaults — 16 kHz mono — match what speech-to-text expects, making this the natural first step before [Transcribe](#transcribe-): pass its `s3Uri` as Transcribe's `audioFileUrl`. Currently the output is always WAV regardless of the requested `outputFormat`.

The result contains `{"s3Uri": ..., "presignedUrl": ..., "bytes": ..., "outputFormat": ...}`; the presigned URL is valid for 1 hour. Nothing is written to AutessaDB — chain an [AutessaDB update](/docs/tools/autessadb.md) if you want the file recorded on a row.

### Example

```json title="Tool config"
{
  "toolType": "EXTRACT_AUDIO",
  "videoFileUrl": "@@{VIDEO_FILE_URL}",
  "outputFormat": "WAV",
  "sampleRateHz": 16000,
  "channels": 1
}
```

**Configuration fields**

- `videoFileUrl` (string) — Presigned URL / s3:// URI / https URL of the source media. Required.
- `outputFormat` (string) — "WAV" or "MP3". Defaults to WAV.
- `sampleRateHz` (integer) — Sample rate in Hz. Defaults to 16000 — matches STT expectations.
- `channels` (integer) — Channel count. Defaults to 1 (mono).

## Transcribe **TOOL** `TRANSCRIBE`

Runs Autessa's long-form speech-to-text pipeline over the audio at `audioFileUrl` and returns the transcript inline — no files are written anywhere. `audioFileUrl` is either the key of a file in your workspace (such as a table's audio or video `filePath`, or Extract Audio's `s3Uri`; the older `s3://` form is still accepted), read when the transcription runs so it never expires in a queue, or an `http(s)` link. Common audio and video formats are accepted (WAV, MP3, M4A, MP4 and others). An optional `languageHint` (ISO code such as `en` or `es`) can steer recognition.

The result is `{"transcriptText": ..., "chars": ...}` plus `segments` (timed spans, in seconds from the start of the audio) when timings are available, and an `isSilent` flag when the audio contained no speech.

### Example

```json title="Tool config"
{
  "toolType": "TRANSCRIBE",
  "audioFileUrl": "@@{AUDIO_FILE_URL}",
  "languageHint": "en"
}
```

**Configuration fields**

- `audioFileUrl` (string) — s3:// URI of a file in the caller's workspace, or an http(s) link; any common audio/video format. Required.
- `languageHint` (string · optional) — Optional ISO language hint (e.g., "en", "es").
- `transcriptS3Uri` (string · optional) — Optional: where the full result (text, segments, word timings) is kept, so every later reader of the same recording gets the SAME transcript without another GPU pass. Only accepted as `.audio/transcript.json` for an s3:// audio file -- the per-file artifact convention (`.video/`, `.hard.`) -- so this argument can never write anywhere else.

## Stock Image Generator **TOOL** `STOCK_IMAGE_GENERATOR`

Searches Unsplash and Pexels in parallel for stock photos matching `query` and returns direct image URLs from both providers. `numberOfResults` is capped at 5 per provider. With `returnTinyUrl` enabled, each URL is wrapped in a short Autessa link (valid 1 hour) that is easier to embed in emails or AutessaDB rows.

The result is `{"unsplash_images": [...], "pexels_images": [...]}` — arrays of URLs. A provider that errors contributes an empty array rather than failing the call.

### Example

```json title="Tool config"
{
  "toolType": "STOCK_IMAGE_GENERATOR",
  "query": "@@{IMAGE_SEARCH_QUERY}",
  "numberOfResults": 5,
  "returnTinyUrl": true
}
```

**Configuration fields**

- `query` (string) — Required string value.
- `numberOfResults` (integer) — Required integer value.
- `returnTinyUrl` (boolean) — Required boolean value.

## Stock Video Generator **TOOL** `STOCK_VIDEO_GENERATOR`

Searches Pexels for stock video clips matching `query`, preferring HD renditions when available. `numberOfResults` is capped at 5, and `returnTinyUrl` works the same as for stock images (1-hour short links).

The result is `{"pexels_videos": [...]}` — an array of direct video URLs.

### Example

```json title="Tool config"
{
  "toolType": "STOCK_VIDEO_GENERATOR",
  "query": "@@{VIDEO_SEARCH_QUERY}",
  "numberOfResults": 3,
  "returnTinyUrl": false
}
```

**Configuration fields**

- `query` (string) — Required string value.
- `numberOfResults` (integer) — Required integer value.
- `returnTinyUrl` (boolean) — Required boolean value.

## Live Search Engine **TOOL** `LIVE_SEARCH_ENGINE`

Runs a live web search through Autessa's managed browser service and returns the raw search results for the agent to read. `numResults` defaults to 5. Searches count against your company's browser-search limit; when the limit is hit the call retries briefly, then returns a rate-limit error with the remaining quota.

The result is `{"statusCode": ..., "body": ..., "headers": {}}` where `body` carries the search results as returned by the search backend.

### Example

```json title="Tool config"
{
  "toolType": "LIVE_SEARCH_ENGINE",
  "query": "@@{SEARCH_QUERY}",
  "numResults": 5
}
```

**Configuration fields**

- `query` (string) — Required string value.
- `numResults` (integer) — Required integer value.

## Scrape URL **TOOL** `SCRAPE_URL`

Fetches a public web page through the managed browser service and returns its content. Set `waitForJs` to `true` for JavaScript-heavy pages — the browser renders the page before extracting content, and JS scrapes are metered in a separate (more expensive) quota bucket than plain fetches. Every URL is validated before the request is sent; requests to private networks and internal infrastructure are rejected with a validation error.

The result is `{"statusCode": ..., "body": ..., "headers": {}}` with the scraped content in `body`.

### Example

```json title="Tool config"
{
  "toolType": "SCRAPE_URL",
  "url": "@@{PAGE_URL}",
  "waitForJs": true
}
```

**Configuration fields**

- `url` (string) — Required string value.
- `waitForJs` (boolean) — Required boolean value.

## Fetch and View **TOOL** `FETCH_AND_VIEW`

Fetches an image or document from a URL and places it directly into the conversation as multimodal content, so the agent can actually look at it on its next turn — unlike [Scrape URL](#scrape-url-), which returns page text. Supports `https://` and `http://` URLs and the key of a file in Autessa storage, such as a table's `filePath` or an upload link's `s3Uri` (the older `s3://` form is still accepted; stored files are presigned for 1 hour), and `contentType` (`image` or `file`) is auto-detected from the extension when omitted.

The result confirms the fetch and carries an `enrichment` payload that the platform injects into the next model request as an image or file block: `{"success": true, "message": ..., "enrichment": [...]}`.

### Example

```json title="Tool config"
{
  "toolType": "FETCH_AND_VIEW",
  "url": "@@{FILE_OR_IMAGE_URL}",
  "contentType": "image"
}
```

**Configuration fields**

- `url` (string) — The URL to fetch. Supports https://, http://, and s3:// URIs. External URLs must be from allowed domains.
- `contentType` (string · optional) — Optional content type hint: "image" or "file". If not provided, will be auto-detected from the URL extension.

## Perplexity Search **TOOL** `PERPLEXITY_SEARCH`

Queries the Perplexity search API, which returns search results with extracted page content — richer than plain result links. `maxResults` (default 10) controls how many results come back, `maxTokens` (default 25000) bounds the total content payload, and `maxTokensPerPage` (default 2048) bounds how much extracted content each page contributes.

The result is `{"statusCode": ..., "body": ..., "headers": {...}}` with Perplexity's response JSON in `body`.

### Example

```json title="Tool config"
{
  "toolType": "PERPLEXITY_SEARCH",
  "query": "@@{RESEARCH_QUERY}",
  "maxResults": 10,
  "maxTokens": 25000,
  "maxTokensPerPage": 2048
}
```

**Configuration fields**

- `query` (string) — Required string value.
- `maxResults` (integer) — Required integer value.
- `maxTokens` (integer) — Required integer value.
- `maxTokensPerPage` (integer) — Required integer value.

## Related

- [Tool Types overview](/docs/tools.md)
- [Core tool types](/docs/tools/core.md)
- [AutessaDB tool types](/docs/tools/autessadb.md)
- [Tools guide](/docs/guide/agentic/tools.md)

