---
canonical_url: "https://docs.composio.dev/toolkits/vercel_ai_gateway"
markdown_url: "https://docs.composio.dev/toolkits/vercel_ai_gateway.md"
product: "platform"
version: null
last_updated: null
---

# Vercel AI Gateway

Access Vercel AI Gateway's model discovery, inference, generation, and usage APIs through a unified AI model gateway.

- **Category:** ai models
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 22
- **Triggers:** 0
- **Slug:** `VERCEL_AI_GATEWAY`
- **Version:** 00000000_00

## Tools

### Compact Response

**Slug:** `VERCEL_AI_GATEWAY_COMPACT_RESPONSE`

Compact a long OpenAI Responses conversation into replayable context through Vercel AI Gateway. This endpoint only supports models routed to OpenAI and does not fail over to other providers; model compatibility is checked by the provider rather than by this action.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input` | string | Yes | Conversation to compact as text or OpenAI Responses input items. It must include at least one user message. |
| `model` | string | Yes | OpenAI model ID in provider/model form. This endpoint only supports models routed to OpenAI. |
| `instructions` | string | No | Optional system-level instructions included in the compacted context. |
| `service_tier` | string ("auto" | "default" | "flex" | "priority") | No | OpenAI service tier requested for the compaction operation. |
| `prompt_cache_key` | string | No | Stable key used to identify related cached prompts. |
| `previous_response_id` | string | No | Previous OpenAI response whose conversation state should be compacted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Count Message Tokens

**Slug:** `VERCEL_AI_GATEWAY_COUNT_MESSAGE_TOKENS`

Estimate input tokens for Anthropic-format messages, system content, and tools before sending a model request through Vercel AI Gateway.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Gateway model ID to use for tokenization. |
| `tools` | array | No | Optional Anthropic tool definitions included in the count, preserving their provider-defined input schemas. |
| `system` | string | No | Optional Anthropic system text or provider-defined system content blocks included in the count. |
| `messages` | array | Yes | Anthropic-format messages whose input tokens should be counted. Message content may contain provider-defined text, image, tool-use, or tool-result blocks. |
| `thinking` | object | No | Optional Anthropic extended-thinking configuration included when calculating the request's input-token usage. |
| `tool_choice` | object | No | Optional Anthropic tool-selection configuration, such as auto, any, or a named tool, included in the token count. |
| `cache_control` | object | No | Optional top-level Anthropic prompt-cache configuration, including automatic cache behavior and provider-supported expiration settings. |
| `output_config` | object | No | Optional Anthropic output configuration, including provider-defined structured-output format settings that affect the token count. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Anthropic Message

**Slug:** `VERCEL_AI_GATEWAY_CREATE_ANTHROPIC_MESSAGE`

Create one non-streaming Anthropic Messages-compatible result through Vercel AI Gateway, with multimodal content, tools, extended thinking, and routing controls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Gateway model ID in provider/model form. |
| `tools` | array | No | Anthropic tool definitions, including built-in tools such as web search. |
| `top_k` | integer | No | Optional number of highest-probability tokens considered at each step. |
| `top_p` | number | No | Optional nucleus-sampling probability between 0 and 1. |
| `system` | string | No | Optional Anthropic system text or provider-defined system content blocks. |
| `messages` | array | Yes | Anthropic-format messages. Content may be text or provider-supported text, image, document, tool-use, or tool-result blocks. |
| `metadata` | object | No | Anthropic request metadata, such as an opaque user identifier. |
| `thinking` | object | No | Anthropic extended-thinking configuration supported by the selected model. |
| `max_tokens` | integer | Yes | Maximum number of tokens to generate before stopping. |
| `temperature` | number | No | Sampling temperature between 0 and 1. |
| `tool_choice` | object | No | Anthropic tool-selection controls, such as auto, any, or a named tool. |
| `service_tier` | string | No | Anthropic service tier requested for this message, when supported. |
| `stop_sequences` | array | No | Custom text sequences that stop generation. |
| `provider_options` | object | No | Gateway routing and provider-specific options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Chat Completion

**Slug:** `VERCEL_AI_GATEWAY_CREATE_CHAT_COMPLETION`

Create one non-streaming OpenAI Chat Completions-compatible result through Vercel AI Gateway, with multimodal messages, tools, structured output, fallback models, and routing controls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `stop` | string | No | One or more sequences at which generation should stop. |
| `model` | string | Yes | Gateway model ID in provider/model form. |
| `tools` | array | No | OpenAI-format tool definitions available to the model. |
| `top_p` | number | No | Optional nucleus-sampling probability between 0 and 1. |
| `models` | array | No | Fallback Gateway model IDs to try in order if the primary model fails. |
| `messages` | array | Yes | OpenAI-format conversation messages. Content may be text or an array of provider-supported text, image, file, audio, or tool-result parts. |
| `max_tokens` | integer | No | Maximum number of tokens to generate. |
| `temperature` | number | No | Sampling temperature between 0 and 2. |
| `tool_choice` | string | No | Whether and how the model may select a supplied tool. |
| `response_format` | object | No | OpenAI response format, including text, JSON, or JSON Schema output. |
| `presence_penalty` | number | No | Penalty for tokens that already appear in the generated text. |
| `provider_options` | object | No | Gateway routing and provider-specific options. |
| `frequency_penalty` | number | No | Penalty for tokens based on their existing frequency. |
| `safety_identifier` | string | No | Opaque end-user identifier used by AI Gateway safety controls. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Embeddings

**Slug:** `VERCEL_AI_GATEWAY_CREATE_EMBEDDINGS`

Generate OpenAI-compatible vector embeddings through Vercel AI Gateway for text or token inputs, with optional dimensions and routing controls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Optional opaque end-user identifier for the embedding request. |
| `input` | string | Yes | Text, a batch of texts, one token array, or a batch of token arrays to embed, as accepted by the selected OpenAI-compatible model. |
| `model` | string | Yes | Gateway embedding model ID in provider/model form. |
| `dimensions` | integer | No | Requested embedding dimensions; AI Gateway maps this across providers. |
| `encoding_format` | string ("float" | "base64") | No | Whether embeddings are returned as float arrays or base64 strings. |
| `provider_options` | object | No | Gateway routing and provider-specific options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Edit Images

**Slug:** `VERCEL_AI_GATEWAY_EDIT_IMAGES`

Create edited images from up to 16 HTTPS or base64 data-URL source images and a text instruction. Uses the non-streaming JSON image-edit route only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | string | No | Requested output dimensions when supported, such as 1024x1024. |
| `user` | string | No | Stable end-user identifier for provider abuse monitoring. |
| `model` | string | Yes | Gateway image model ID that supports image editing. |
| `images` | array | Yes | Source images referenced only by HTTPS URL or base64 data URL. |
| `prompt` | string | Yes | Instructions describing how to edit the source images. |
| `quality` | string | No | Provider-supported output quality, such as high, medium, or low. |
| `background` | string ("auto" | "transparent" | "opaque") | No | Background behavior for models that support this option. |
| `moderation` | string | No | Provider-supported image moderation setting. |
| `image_count` | integer | No | Number of edited images to generate, subject to the model's limit. |
| `output_format` | string ("png" | "jpeg" | "webp") | No | Requested output image encoding. |
| `input_fidelity` | string | No | Provider-supported control for preserving source-image details. |
| `provider_options` | object | No | Gateway routing and provider-specific image options. |
| `output_compression` | integer | No | Compression level from 0 to 100 for JPEG or WebP output. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Evaluate State

**Slug:** `VERCEL_AI_GATEWAY_EVALUATE_STATE`

Evaluate one shared state against one or more typed choice, score, or boolean questions using an AI Gateway evaluation model. Returns structured answers, token usage, and gateway metadata rather than generated prose.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Gateway evaluation model ID. |
| `state` | string | Yes | Shared state to evaluate as any recursively nested JSON value. |
| `questions` | object | Yes | Nonempty map of question IDs to typed choice, score, or boolean questions. Answer keys match these IDs. |
| `provider_options` | object | No | Optional AI Gateway routing and provider controls, including zero data retention or provider restrictions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Images

**Slug:** `VERCEL_AI_GATEWAY_GENERATE_IMAGES`

Generate one or more images from a text prompt through an image-only Vercel AI Gateway model. Returns a completed non-streaming JSON response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | string | No | Requested image dimensions when supported, such as 1024x1024. |
| `model` | string | Yes | Gateway image model ID in provider/model form. |
| `prompt` | string | Yes | Text description of the image to generate. |
| `quality` | string | No | Provider-supported output quality, such as high, medium, or low. |
| `image_count` | integer | No | Number of images to generate, subject to the selected model's limit. |
| `response_format` | string ("b64_json" | "url") | No | Image representation requested from compatible models. |
| `provider_options` | object | No | Gateway routing and provider-specific image options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Response

**Slug:** `VERCEL_AI_GATEWAY_GENERATE_RESPONSE`

Generate one non-streaming OpenAI Responses-compatible result through AI Gateway, with optional instructions, tools, structured output, reasoning, and routing controls. Inspect status because a successful HTTP response may still be incomplete.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | object | No | Text output controls, including an OpenAI Responses structured-output format. |
| `input` | string | Yes | User input text or OpenAI Responses input items, including prior messages or multimodal content. |
| `model` | string | Yes | Gateway model ID in provider/model form. |
| `store` | boolean | No | Whether the provider should store the response for later retrieval. |
| `tools` | array | No | OpenAI Responses tool definitions available to the model. |
| `top_p` | number | No | Optional nucleus-sampling probability between 0 and 1. |
| `caching` | string | No | Set to auto to let AI Gateway add provider-appropriate cache markers. |
| `metadata` | object | No | Up to 16 string key-value pairs for tracking this response. |
| `cache_ttl` | string ("5m" | "1h") | No | Automatic prompt-cache lifetime; requires caching set to auto. |
| `reasoning` | object | No | Reasoning controls supported by the selected model, such as effort or summary. |
| `truncation` | string ("auto" | "disabled") | No | Long-input truncation strategy: auto or disabled. |
| `temperature` | number | No | Sampling temperature accepted by the selected model. |
| `tool_choice` | string | No | How the model may choose from supplied tools: none disables tool calls, auto lets the model decide, required forces a tool call, and an OpenAI Responses tool-choice object selects a specific tool. |
| `instructions` | string | No | System-level instructions for this response. |
| `allowed_tools` | array | No | Optional subset of supplied tool names the model may call. |
| `presence_penalty` | number | No | Optional penalty for tokens that already appear in the generated text. |
| `prompt_cache_key` | string | No | Stable key used to identify related cached prompts. |
| `provider_options` | object | No | Gateway routing and provider-specific options. |
| `frequency_penalty` | number | No | Optional penalty based on how frequently tokens already appear. |
| `max_output_tokens` | integer | No | Optional maximum generated tokens, including reasoning tokens. |
| `cache_anchor_items` | integer | No | Number of leading input items that remain byte-stable for cache anchoring. |
| `parallel_tool_calls` | boolean | No | Whether the model may call multiple tools in one turn. |
| `previous_response_id` | string | No | Prior response ID to continue when the selected provider supports response chaining. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Speech

**Slug:** `VERCEL_AI_GATEWAY_GENERATE_SPEECH`

Generate spoken audio from text through a Vercel AI Gateway speech model. Returns completed base64 audio in JSON; streaming output is not supported.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text to convert into spoken audio. |
| `model` | string | Yes | Gateway speech model ID in provider/model form. |
| `speed` | number | No | Requested playback speed when supported by the model. |
| `voice` | string | No | Model-supported voice, such as alloy. |
| `language` | string | No | Language of the input text when the model accepts an explicit language. |
| `instructions` | string | No | Directions for speaking style, tone, or pacing when supported. |
| `output_format` | string | No | Requested audio encoding, such as mp3 or wav. |
| `provider_options` | object | No | Provider-specific speech options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Credit Balance

**Slug:** `VERCEL_AI_GATEWAY_GET_CREDIT_BALANCE`

Return the connected team's remaining AI Gateway credit balance and lifetime credit usage in USD.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Generation

**Slug:** `VERCEL_AI_GATEWAY_GET_GENERATION`

Look up cost, token usage, provider routing, latency, and finish details for one completed Vercel AI Gateway generation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `generation_id` | string | Yes | Generation ID returned by inference. It starts with gen_ followed by a 26-character ULID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Model

**Slug:** `VERCEL_AI_GATEWAY_GET_MODEL`

Return detailed capabilities, modalities, limits, tags, and pricing for one exact Gateway model ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | Exact provider/model ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Model Endpoints

**Slug:** `VERCEL_AI_GATEWAY_GET_MODEL_ENDPOINTS`

Compare provider endpoints serving one Vercel AI Gateway model, including limits, pricing, caching, availability, throughput, and latency.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | Exact model ID in provider/model form. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Spend Report

**Slug:** `VERCEL_AI_GATEWAY_GET_SPEND_REPORT`

Query aggregated Vercel AI Gateway spend and token usage. This endpoint requires a Pro or Enterprise plan, and each query costs $5 per 1,000 queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | string | No | One or more comma-separated reporting tags to match. |
| `model` | string | No | Only include this model in creator/model-name form. |
| `user_id` | string | No | Only include requests attributed to this user ID. |
| `end_date` | string | Yes | Inclusive UTC end date in YYYY-MM-DD format. |
| `group_by` | string ("day" | "user" | "model" | "tag" | "provider" | "credential_type" | "zero_data_retention" | "api_key_name") | No | Aggregation dimension. Defaults to day when omitted. |
| `provider` | string | No | Only include requests served by this provider. |
| `date_part` | string ("day" | "hour") | No | Time granularity when group_by is day. Defaults to day. |
| `api_key_id` | string | No | Stable API key ID to filter by, or self for the API key authenticating this request. |
| `start_date` | string | Yes | Inclusive UTC start date in YYYY-MM-DD format. |
| `tags_match` | string ("any" | "all") | No | Whether requests must match any or all supplied tags. Defaults to any. |
| `credential_type` | string ("byok" | "system") | No | Only include BYOK or AI Gateway system-credential requests. |
| `zero_data_retention` | boolean | No | Filter by whether Zero Data Retention was requested. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Model Catalog

**Slug:** `VERCEL_AI_GATEWAY_LIST_MODEL_CATALOG`

List AI Gateway model-to-provider routes and capability tags, with bounded local filtering by model text, provider, or tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | Case-insensitive exact provider capability tag to include. |
| `query` | string | No | Case-insensitive text to match against model slugs, provider names, or provider model IDs. |
| `provider` | string | No | Case-insensitive exact provider name to include. |
| `max_results` | integer | No | Maximum matching catalog models to return (1-100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List TypeSafe Models

**Slug:** `VERCEL_AI_GATEWAY_LIST_TYPESAFE_MODELS`

List evaluation models available through AI Gateway's TypeSafe-compatible API, including each accepted model name, description, and release date.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rerank Object Documents

**Slug:** `VERCEL_AI_GATEWAY_RERANK_OBJECT_DOCUMENTS`

Rank structured object documents by relevance through the Cohere v1 route, using selected rank fields and optionally returning each source document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Gateway reranking model ID. |
| `query` | string | Yes | Query against which the documents should be ranked. |
| `top_n` | integer | No | Maximum highest-ranked results to return; cannot exceed the number of documents. |
| `documents` | array | Yes | Structured documents to rank; each result index refers to this array. Use rank_fields to identify the text-bearing fields. |
| `rank_fields` | array | No | Structured document fields to rank, in priority order. When omitted, the provider defaults to the text field. |
| `provider_options` | object | No | Gateway routing and provider-specific options. |
| `return_documents` | boolean | No | Set true to include each original structured document in the results. When omitted, the provider default is false. |
| `max_tokens_per_document` | integer | No | Optional per-document token cap. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rerank Text Documents

**Slug:** `VERCEL_AI_GATEWAY_RERANK_TEXT_DOCUMENTS`

Rerank string documents through the current Cohere v2 compatibility endpoint. Unlike the v1 action, this action accepts text strings only and does not support object documents, rank_fields, or return_documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Gateway reranking model ID. |
| `query` | string | Yes | Query against which the documents should be ranked. |
| `top_n` | integer | No | Maximum highest-ranked results to return; defaults to all documents. |
| `documents` | array | Yes | Text-only documents to rank using the Cohere v2 compatibility API. |
| `provider_options` | object | No | AI Gateway routing options, including providerOptions.gateway controls. |
| `max_tokens_per_document` | integer | No | Optional per-document token cap. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Models

**Slug:** `VERCEL_AI_GATEWAY_SEARCH_MODELS`

Search the AI Gateway model catalog by text, model type, and tags, returning capability and pricing metadata for matching models.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Case-insensitive text to match against model ID, name, owner, or description. |
| `model_type` | string | No | Exact catalog model type to include, such as language, embedding, image, or reranking. |
| `max_results` | integer | No | Maximum matching models to return after scanning the complete catalog (1-100). |
| `required_tags` | array | No | Tags every returned model must have, such as free, reasoning, or tool-use. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Transcribe Audio

**Slug:** `VERCEL_AI_GATEWAY_TRANSCRIBE_AUDIO`

Transcribe base64-encoded recorded audio through a Vercel AI Gateway transcription model. Returns one completed JSON transcript, not a live stream.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `audio` | string | Yes | Base64-encoded recorded audio bytes. |
| `model` | string | Yes | Gateway transcription model ID in provider/model form. |
| `media_type` | string | Yes | MIME type of the encoded audio, such as audio/mpeg or audio/wav. |
| `provider_options` | object | No | Provider-specific transcription options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Evaluate with TypeSafe API

**Slug:** `VERCEL_AI_GATEWAY_TYPESAFE_EVALUATE`

Evaluate one shared state through AI Gateway's TypeSafe-compatible System One API. Use this compatibility action for TypeSafe noul, choice, and score request shapes; use Evaluate State for new integrations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | TypeSafe evaluation model name accepted by AI Gateway. |
| `state` | string | Yes | Shared state to evaluate as any recursively nested JSON value. |
| `questions` | object | Yes | Nonempty map of question IDs to TypeSafe noul, choice, or score questions. Answer keys match these IDs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
