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

# openrouter-ai

> OpenRouter AI — chat completions, models, embeddings, audio, video, and reranking

**Server path:** `/openrouter-ai` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                          | Description                                                                         |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [`openrouter_ai_create_audio_speech`](#openrouter_ai_create_audio_speech)                     | Create speech                                                                       |
| [`openrouter_ai_create_audio_transcriptions`](#openrouter_ai_create_audio_transcriptions)     | Create transcription                                                                |
| [`openrouter_ai_create_embeddings`](#openrouter_ai_create_embeddings)                         | Submit an embedding request                                                         |
| [`openrouter_ai_create_messages`](#openrouter_ai_create_messages)                             | Create a message                                                                    |
| [`openrouter_ai_create_rerank`](#openrouter_ai_create_rerank)                                 | Submit a rerank request                                                             |
| [`openrouter_ai_create_responses`](#openrouter_ai_create_responses)                           | Create a response                                                                   |
| [`openrouter_ai_create_videos`](#openrouter_ai_create_videos)                                 | Submit a video generation request                                                   |
| [`openrouter_ai_get_generation`](#openrouter_ai_get_generation)                               | Get request & usage metadata for a generation                                       |
| [`openrouter_ai_get_models`](#openrouter_ai_get_models)                                       | List all models and their properties                                                |
| [`openrouter_ai_get_videos`](#openrouter_ai_get_videos)                                       | Poll video generation status                                                        |
| [`openrouter_ai_list_embeddings_models`](#openrouter_ai_list_embeddings_models)               | List all embeddings models                                                          |
| [`openrouter_ai_list_endpoints`](#openrouter_ai_list_endpoints)                               | List all endpoints for a model                                                      |
| [`openrouter_ai_list_endpoints_zdr`](#openrouter_ai_list_endpoints_zdr)                       | Preview the impact of ZDR on the available endpoints                                |
| [`openrouter_ai_list_generation_content`](#openrouter_ai_list_generation_content)             | Get stored prompt and completion content for a generation                           |
| [`openrouter_ai_list_models_count`](#openrouter_ai_list_models_count)                         | Get total count of available models                                                 |
| [`openrouter_ai_list_models_user`](#openrouter_ai_list_models_user)                           | List models filtered by user provider preferences, privacy settings, and guardrails |
| [`openrouter_ai_list_private_models`](#openrouter_ai_list_private_models)                     | Get a private model                                                                 |
| [`openrouter_ai_list_private_models_endpoints`](#openrouter_ai_list_private_models_endpoints) | List endpoints for a private model                                                  |
| [`openrouter_ai_list_providers`](#openrouter_ai_list_providers)                               | List all providers                                                                  |
| [`openrouter_ai_list_videos_content`](#openrouter_ai_list_videos_content)                     | Download generated video content                                                    |
| [`openrouter_ai_list_videos_models`](#openrouter_ai_list_videos_models)                       | List all video generation models                                                    |
| [`openrouter_ai_send_chat_completion_request`](#openrouter_ai_send_chat_completion_request)   | Create a chat completion                                                            |

***

## openrouter\_ai\_create\_audio\_speech

Create speech

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `input`                   | string | Yes      | —       | Text to synthesize                                                                                                                               |
| `model`                   | string | Yes      | —       | TTS model identifier                                                                                                                             |
| `provider`                | object | No       | —       | Provider-specific passthrough configuration                                                                                                      |
| `response_format`         | string | No       | —       | Audio output format                                                                                                                              |
| `speed`                   | number | No       | —       | Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.                                    |
| `voice`                   | string | Yes      | —       | Voice identifier (provider-specific).                                                                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "input": {
        "type": "string",
        "description": "Text to synthesize"
      },
      "model": {
        "type": "string",
        "description": "TTS model identifier"
      },
      "provider": {
        "type": "object",
        "description": "Provider-specific passthrough configuration",
        "properties": {
          "options": {
            "type": "object",
            "description": "Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."
          }
        }
      },
      "response_format": {
        "type": "string",
        "description": "Audio output format",
        "enum": [
          "mp3",
          "pcm"
        ]
      },
      "speed": {
        "type": "number",
        "description": "Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers."
      },
      "voice": {
        "type": "string",
        "description": "Voice identifier (provider-specific)."
      }
    },
    "required": [
      "PCID",
      "input",
      "model",
      "voice"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_audio\_transcriptions

Create transcription

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `input_audio`             | object | Yes      | —       | Base64-encoded audio to transcribe                                                                                                               |
| `language`                | string | No       | —       | ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted.                                                                            |
| `model`                   | string | Yes      | —       | STT model identifier                                                                                                                             |
| `provider`                | object | No       | —       | Provider-specific passthrough configuration                                                                                                      |
| `temperature`             | number | No       | —       | Sampling temperature for transcription                                                                                                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "input_audio": {
        "type": "object",
        "description": "Base64-encoded audio to transcribe",
        "properties": {
          "data": {
            "type": "string",
            "description": "Base64-encoded audio data (raw bytes, not a data URI)"
          },
          "format": {
            "type": "string",
            "description": "Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider."
          }
        },
        "required": [
          "data",
          "format"
        ]
      },
      "language": {
        "type": "string",
        "description": "ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."
      },
      "model": {
        "type": "string",
        "description": "STT model identifier"
      },
      "provider": {
        "type": "object",
        "description": "Provider-specific passthrough configuration",
        "properties": {
          "options": {
            "type": "object",
            "description": "Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."
          }
        }
      },
      "temperature": {
        "type": "number",
        "description": "Sampling temperature for transcription"
      }
    },
    "required": [
      "PCID",
      "input_audio",
      "model"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_embeddings

Submit an embedding request

**Parameters:**

| Parameter                 | Type    | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string  | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string  | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string  | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `dimensions`              | integer | No       | —       | The number of dimensions for the output embeddings                                                                                               |
| `encoding_format`         | string  | No       | —       | The format of the output embeddings                                                                                                              |
| `input`                   | object  | Yes      | —       | Text, token, or multimodal input(s) to embed                                                                                                     |
| `input_type`              | string  | No       | —       | The type of input (e.g. search\_query, search\_document)                                                                                         |
| `model`                   | string  | Yes      | —       | The model to use for embeddings                                                                                                                  |
| `provider`                | object  | No       | —       | The provider value                                                                                                                               |
| `user`                    | string  | No       | —       | A unique identifier for the end-user                                                                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "dimensions": {
        "type": "integer",
        "description": "The number of dimensions for the output embeddings"
      },
      "encoding_format": {
        "type": "string",
        "description": "The format of the output embeddings",
        "enum": [
          "float",
          "base64"
        ]
      },
      "input": {
        "description": "Text, token, or multimodal input(s) to embed"
      },
      "input_type": {
        "type": "string",
        "description": "The type of input (e.g. search_query, search_document)"
      },
      "model": {
        "type": "string",
        "description": "The model to use for embeddings"
      },
      "provider": {
        "description": "The provider value"
      },
      "user": {
        "type": "string",
        "description": "A unique identifier for the end-user"
      }
    },
    "required": [
      "PCID",
      "input",
      "model"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_messages

Create a message

**Parameters:**

| Parameter                 | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                             |
| ------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string    | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                                                                                                                                                     |                                                                                                                                                                                             |
| `X-OpenRouter-Title`      | string    | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `X-OpenRouter-Categories` | string    | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                                                                                                                                                                |                                                                                                                                                                                             |
| `cache_control`           | object    | No       | —       | Cache Control                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                             |
| `context_management`      | object    | No       | —       | Context Management                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| `max_tokens`              | integer   | No       | —       | Max Tokens                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                             |
| `messages`                | object\[] | Yes      | —       | The messages value                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| `metadata`                | object    | No       | —       | The metadata value                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| `model`                   | string    | Yes      | —       | The model value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `models`                  | string\[] | No       | —       | The models value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `output_config`           | object    | No       | —       | Configuration for controlling output behavior. Supports the effort parameter and structured output format.                                                                                                                                                                                           |                                                                                                                                                                                             |
| `plugins`                 | any\[]    | No       | —       | Plugins you want to enable for this request, including their settings.                                                                                                                                                                                                                               |                                                                                                                                                                                             |
| `provider`                | object    | No       | —       | When multiple model providers are available, optionally indicate your routing preference.                                                                                                                                                                                                            |                                                                                                                                                                                             |
| `route`                   | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). |
| `service_tier`            | string    | No       | —       | Service Tier                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `session_id`              | string    | No       | —       | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.                                                          |                                                                                                                                                                                             |
| `speed`                   | object    | No       | —       | The speed value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `stop_sequences`          | string\[] | No       | —       | Stop Sequences                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                             |
| `stream`                  | boolean   | No       | —       | The stream value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `system`                  | object    | No       | —       | The system value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `temperature`             | number    | No       | —       | The temperature value                                                                                                                                                                                                                                                                                |                                                                                                                                                                                             |
| `thinking`                | object    | No       | —       | The thinking value                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| `tool_choice`             | object    | No       | —       | Tool Choice                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                             |
| `tools`                   | any\[]    | No       | —       | The tools value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `top_k`                   | integer   | No       | —       | Top K                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                             |
| `top_p`                   | number    | No       | —       | Top P                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                             |
| `trace`                   | object    | No       | —       | Metadata for observability and tracing. Known keys (trace\_id, trace\_name, span\_name, generation\_name, parent\_span\_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.                                                       |                                                                                                                                                                                             |
| `user`                    | string    | No       | —       | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. |                                                                                                                                                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "cache_control": {
        "type": "object",
        "description": "Cache Control",
        "properties": {
          "ttl": {
            "type": "string",
            "description": "The ttl value",
            "enum": [
              "5m",
              "1h"
            ]
          },
          "type": {
            "type": "string",
            "description": "The type value",
            "enum": [
              "ephemeral"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "context_management": {
        "type": "object",
        "description": "Context Management",
        "properties": {
          "edits": {
            "type": "array",
            "description": "The edits value"
          }
        }
      },
      "max_tokens": {
        "type": "integer",
        "description": "Max Tokens"
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "content": {
              "description": "The content value"
            },
            "role": {
              "type": "string",
              "enum": [
                "user",
                "assistant"
              ],
              "description": "The role value"
            }
          },
          "required": [
            "role",
            "content"
          ]
        },
        "description": "The messages value"
      },
      "metadata": {
        "type": "object",
        "description": "The metadata value",
        "properties": {
          "user_id": {
            "type": "string",
            "description": "User Id"
          }
        }
      },
      "model": {
        "type": "string",
        "description": "The model value"
      },
      "models": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The models value"
      },
      "output_config": {
        "type": "object",
        "description": "Configuration for controlling output behavior. Supports the effort parameter and structured output format.",
        "properties": {
          "effort": {
            "type": "string",
            "description": "How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.",
            "enum": [
              "low",
              "medium",
              "high",
              "xhigh",
              "max"
            ]
          },
          "format": {
            "type": "object",
            "description": "A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)."
          },
          "task_budget": {
            "type": "object",
            "description": "Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap."
          }
        }
      },
      "plugins": {
        "type": "array",
        "description": "Plugins you want to enable for this request, including their settings."
      },
      "provider": {
        "type": "object",
        "description": "When multiple model providers are available, optionally indicate your routing preference.",
        "properties": {
          "allow_fallbacks": {
            "type": "boolean",
            "description": "Whether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it's unavailable."
          },
          "data_collection": {
            "type": "string",
            "description": "Data collection setting. If no available model provider meets the requirement, your request will return an error. - allow: (default) allow providers which store user data non-transiently and may train on it  - deny: use only providers which do not collect user data.",
            "enum": [
              "deny",
              "allow"
            ]
          },
          "enforce_distillable_text": {
            "type": "boolean",
            "description": "Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."
          },
          "ignore": {
            "type": "array",
            "description": "List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."
          },
          "max_price": {
            "type": "object",
            "description": "The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."
          },
          "only": {
            "type": "array",
            "description": "List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."
          },
          "order": {
            "type": "array",
            "description": "An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message."
          },
          "preferred_max_latency": {
            "description": "Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "preferred_min_throughput": {
            "description": "Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "quantizations": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "int4",
                "int8",
                "fp4",
                "fp6",
                "fp8",
                "fp16",
                "bf16",
                "fp32",
                "unknown"
              ]
            },
            "description": "A list of quantization levels to filter the provider by."
          },
          "require_parameters": {
            "type": "boolean",
            "description": "Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest."
          },
          "sort": {
            "description": "The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."
          },
          "zdr": {
            "type": "boolean",
            "description": "Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."
          }
        }
      },
      "route": {
        "type": [
          "string",
          "null"
        ],
        "description": "**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: \"fallback\" (maps to \"model\"), \"sort\" (maps to \"none\").",
        "enum": [
          "fallback",
          "sort"
        ]
      },
      "service_tier": {
        "type": "string",
        "description": "Service Tier",
        "enum": [
          "auto",
          "standard_only"
        ]
      },
      "session_id": {
        "type": "string",
        "description": "A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."
      },
      "speed": {
        "description": "The speed value"
      },
      "stop_sequences": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Stop Sequences"
      },
      "stream": {
        "type": "boolean",
        "description": "The stream value"
      },
      "system": {
        "description": "The system value"
      },
      "temperature": {
        "type": "number",
        "description": "The temperature value"
      },
      "thinking": {
        "description": "The thinking value"
      },
      "tool_choice": {
        "description": "Tool Choice"
      },
      "tools": {
        "type": "array",
        "description": "The tools value"
      },
      "top_k": {
        "type": "integer",
        "description": "Top K"
      },
      "top_p": {
        "type": "number",
        "description": "Top P"
      },
      "trace": {
        "type": "object",
        "description": "Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.",
        "properties": {
          "generation_name": {
            "type": "string",
            "description": "Generation Name"
          },
          "parent_span_id": {
            "type": "string",
            "description": "Parent Span Id"
          },
          "span_name": {
            "type": "string",
            "description": "Span Name"
          },
          "trace_id": {
            "type": "string",
            "description": "Trace Id"
          },
          "trace_name": {
            "type": "string",
            "description": "Trace Name"
          }
        }
      },
      "user": {
        "type": "string",
        "description": "A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."
      }
    },
    "required": [
      "PCID",
      "messages",
      "model"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_rerank

Submit a rerank request

**Parameters:**

| Parameter                 | Type      | Required | Default | Description                                                                                                                                      |
| ------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string    | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string    | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string    | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `documents`               | string\[] | Yes      | —       | The list of documents to rerank                                                                                                                  |
| `model`                   | string    | Yes      | —       | The rerank model to use                                                                                                                          |
| `provider`                | object    | No       | —       | The provider value                                                                                                                               |
| `query`                   | string    | Yes      | —       | The search query to rerank documents against                                                                                                     |
| `top_n`                   | integer   | No       | —       | Number of most relevant documents to return                                                                                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "documents": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The list of documents to rerank"
      },
      "model": {
        "type": "string",
        "description": "The rerank model to use"
      },
      "provider": {
        "description": "The provider value"
      },
      "query": {
        "type": "string",
        "description": "The search query to rerank documents against"
      },
      "top_n": {
        "type": "integer",
        "description": "Number of most relevant documents to return"
      }
    },
    "required": [
      "PCID",
      "documents",
      "model",
      "query"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_responses

Create a response

**Parameters:**

| Parameter                 | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                             |
| ------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string    | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                                                                                                                                                     |                                                                                                                                                                                             |
| `X-OpenRouter-Title`      | string    | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `X-OpenRouter-Categories` | string    | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                                                                                                                                                                |                                                                                                                                                                                             |
| `background`              | boolean   | null     | No      | —                                                                                                                                                                                                                                                                                                    | The background value                                                                                                                                                                        |
| `frequency_penalty`       | number    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Frequency Penalty                                                                                                                                                                           |
| `image_config`            | object    | No       | —       | Provider-specific image configuration options. Keys and values vary by model/provider. See [https://openrouter.ai/docs/guides/overview/multimodal/image-generation](https://openrouter.ai/docs/guides/overview/multimodal/image-generation) for more details.                                        |                                                                                                                                                                                             |
| `include`                 | string\[] | No       | —       | Related resources to include                                                                                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `input`                   | object    | Yes      | —       | Input for a response request - can be a string or array of items                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `instructions`            | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | The instructions value                                                                                                                                                                      |
| `max_output_tokens`       | integer   | null     | No      | —                                                                                                                                                                                                                                                                                                    | Max Output Tokens                                                                                                                                                                           |
| `max_tool_calls`          | integer   | null     | No      | —                                                                                                                                                                                                                                                                                                    | Max Tool Calls                                                                                                                                                                              |
| `metadata`                | object    | No       | —       | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.                                                                                                                                         |                                                                                                                                                                                             |
| `modalities`              | string\[] | No       | —       | Output modalities for the response. Supported values are "text" and "image".                                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `model`                   | string    | Yes      | —       | The model value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `models`                  | string\[] | No       | —       | The models value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `parallel_tool_calls`     | boolean   | null     | No      | —                                                                                                                                                                                                                                                                                                    | Parallel Tool Calls                                                                                                                                                                         |
| `plugins`                 | any\[]    | No       | —       | Plugins you want to enable for this request, including their settings.                                                                                                                                                                                                                               |                                                                                                                                                                                             |
| `presence_penalty`        | number    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Presence Penalty                                                                                                                                                                            |
| `previous_response_id`    | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Previous Response Id                                                                                                                                                                        |
| `prompt`                  | object    | No       | —       | The prompt value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `prompt_cache_key`        | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Prompt Cache Key                                                                                                                                                                            |
| `provider`                | object    | No       | —       | When multiple model providers are available, optionally indicate your routing preference.                                                                                                                                                                                                            |                                                                                                                                                                                             |
| `reasoning`               | object    | No       | —       | Configuration for reasoning mode in the response                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `route`                   | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). |
| `safety_identifier`       | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Safety Identifier                                                                                                                                                                           |
| `service_tier`            | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Service Tier                                                                                                                                                                                |
| `session_id`              | string    | No       | —       | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.                                                          |                                                                                                                                                                                             |
| `store`                   | boolean   | No       | —       | The store value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `stream`                  | boolean   | No       | —       | The stream value                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `temperature`             | number    | null     | No      | —                                                                                                                                                                                                                                                                                                    | The temperature value                                                                                                                                                                       |
| `text`                    | object    | No       | —       | Text output configuration including format and verbosity                                                                                                                                                                                                                                             |                                                                                                                                                                                             |
| `tool_choice`             | object    | No       | —       | Tool Choice                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                             |
| `tools`                   | any\[]    | No       | —       | The tools value                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `top_k`                   | integer   | No       | —       | Top K                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                             |
| `top_logprobs`            | integer   | null     | No      | —                                                                                                                                                                                                                                                                                                    | Top Logprobs                                                                                                                                                                                |
| `top_p`                   | number    | null     | No      | —                                                                                                                                                                                                                                                                                                    | Top P                                                                                                                                                                                       |
| `trace`                   | object    | No       | —       | Metadata for observability and tracing. Known keys (trace\_id, trace\_name, span\_name, generation\_name, parent\_span\_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.                                                       |                                                                                                                                                                                             |
| `truncation`              | string    | null     | No      | —                                                                                                                                                                                                                                                                                                    | The truncation value                                                                                                                                                                        |
| `user`                    | string    | No       | —       | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. |                                                                                                                                                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "background": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "The background value"
      },
      "frequency_penalty": {
        "type": [
          "number",
          "null"
        ],
        "description": "Frequency Penalty"
      },
      "image_config": {
        "type": "object",
        "description": "Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."
      },
      "include": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "file_search_call.results",
            "message.input_image.image_url",
            "computer_call_output.output.image_url",
            "reasoning.encrypted_content",
            "code_interpreter_call.outputs"
          ]
        },
        "description": "Related resources to include"
      },
      "input": {
        "description": "Input for a response request - can be a string or array of items"
      },
      "instructions": {
        "type": [
          "string",
          "null"
        ],
        "description": "The instructions value"
      },
      "max_output_tokens": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Max Output Tokens"
      },
      "max_tool_calls": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Max Tool Calls"
      },
      "metadata": {
        "type": "object",
        "description": "Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed."
      },
      "modalities": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "text",
            "image"
          ]
        },
        "description": "Output modalities for the response. Supported values are \"text\" and \"image\"."
      },
      "model": {
        "type": "string",
        "description": "The model value"
      },
      "models": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The models value"
      },
      "parallel_tool_calls": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Parallel Tool Calls"
      },
      "plugins": {
        "type": "array",
        "description": "Plugins you want to enable for this request, including their settings."
      },
      "presence_penalty": {
        "type": [
          "number",
          "null"
        ],
        "description": "Presence Penalty"
      },
      "previous_response_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "Previous Response Id"
      },
      "prompt": {
        "type": "object",
        "description": "The prompt value",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id value"
          },
          "variables": {
            "type": "object",
            "description": "The variables value"
          }
        },
        "required": [
          "id"
        ]
      },
      "prompt_cache_key": {
        "type": [
          "string",
          "null"
        ],
        "description": "Prompt Cache Key"
      },
      "provider": {
        "type": "object",
        "description": "When multiple model providers are available, optionally indicate your routing preference.",
        "properties": {
          "allow_fallbacks": {
            "type": "boolean",
            "description": "Whether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it's unavailable."
          },
          "data_collection": {
            "type": "string",
            "description": "Data collection setting. If no available model provider meets the requirement, your request will return an error. - allow: (default) allow providers which store user data non-transiently and may train on it  - deny: use only providers which do not collect user data.",
            "enum": [
              "deny",
              "allow"
            ]
          },
          "enforce_distillable_text": {
            "type": "boolean",
            "description": "Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."
          },
          "ignore": {
            "type": "array",
            "description": "List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."
          },
          "max_price": {
            "type": "object",
            "description": "The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."
          },
          "only": {
            "type": "array",
            "description": "List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."
          },
          "order": {
            "type": "array",
            "description": "An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message."
          },
          "preferred_max_latency": {
            "description": "Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "preferred_min_throughput": {
            "description": "Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "quantizations": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "int4",
                "int8",
                "fp4",
                "fp6",
                "fp8",
                "fp16",
                "bf16",
                "fp32",
                "unknown"
              ]
            },
            "description": "A list of quantization levels to filter the provider by."
          },
          "require_parameters": {
            "type": "boolean",
            "description": "Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest."
          },
          "sort": {
            "description": "The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."
          },
          "zdr": {
            "type": "boolean",
            "description": "Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."
          }
        }
      },
      "reasoning": {
        "description": "Configuration for reasoning mode in the response"
      },
      "route": {
        "type": [
          "string",
          "null"
        ],
        "description": "**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: \"fallback\" (maps to \"model\"), \"sort\" (maps to \"none\").",
        "enum": [
          "fallback",
          "sort"
        ]
      },
      "safety_identifier": {
        "type": [
          "string",
          "null"
        ],
        "description": "Safety Identifier"
      },
      "service_tier": {
        "type": [
          "string",
          "null"
        ],
        "description": "Service Tier",
        "enum": [
          "auto",
          "default",
          "flex",
          "priority",
          "scale"
        ]
      },
      "session_id": {
        "type": "string",
        "description": "A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."
      },
      "store": {
        "type": "boolean",
        "description": "The store value"
      },
      "stream": {
        "type": "boolean",
        "description": "The stream value"
      },
      "temperature": {
        "type": [
          "number",
          "null"
        ],
        "description": "The temperature value"
      },
      "text": {
        "description": "Text output configuration including format and verbosity"
      },
      "tool_choice": {
        "description": "Tool Choice"
      },
      "tools": {
        "type": "array",
        "description": "The tools value"
      },
      "top_k": {
        "type": "integer",
        "description": "Top K"
      },
      "top_logprobs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Top Logprobs"
      },
      "top_p": {
        "type": [
          "number",
          "null"
        ],
        "description": "Top P"
      },
      "trace": {
        "type": "object",
        "description": "Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.",
        "properties": {
          "generation_name": {
            "type": "string",
            "description": "Generation Name"
          },
          "parent_span_id": {
            "type": "string",
            "description": "Parent Span Id"
          },
          "span_name": {
            "type": "string",
            "description": "Span Name"
          },
          "trace_id": {
            "type": "string",
            "description": "Trace Id"
          },
          "trace_name": {
            "type": "string",
            "description": "Trace Name"
          }
        }
      },
      "truncation": {
        "type": [
          "string",
          "null"
        ],
        "description": "The truncation value",
        "enum": [
          "auto",
          "disabled"
        ]
      },
      "user": {
        "type": "string",
        "description": "A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."
      }
    },
    "required": [
      "PCID",
      "input",
      "model"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_create\_videos

Submit a video generation request

**Parameters:**

| Parameter                 | Type      | Required | Default | Description                                                                                                                                                                                               |
| ------------------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string    | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                                                          |
| `X-OpenRouter-Title`      | string    | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                                                              |
| `X-OpenRouter-Categories` | string    | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                                                                     |
| `aspect_ratio`            | string    | No       | —       | Aspect ratio of the generated video                                                                                                                                                                       |
| `callback_url`            | string    | No       | —       | URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.                                                  |
| `duration`                | integer   | No       | —       | Duration of the generated video in seconds                                                                                                                                                                |
| `frame_images`            | any\[]    | No       | —       | Images to use as the first and/or last frame of the generated video. Each image must specify a frame\_type of first\_frame or last\_frame.                                                                |
| `generate_audio`          | boolean   | No       | —       | Whether to generate audio alongside the video. Defaults to the endpoint's generate\_audio capability flag, false if not set.                                                                              |
| `input_references`        | object\[] | No       | —       | Reference images to guide video generation                                                                                                                                                                |
| `model`                   | string    | Yes      | —       | The model value                                                                                                                                                                                           |
| `prompt`                  | string    | Yes      | —       | The prompt value                                                                                                                                                                                          |
| `provider`                | object    | No       | —       | Provider-specific passthrough configuration                                                                                                                                                               |
| `resolution`              | string    | No       | —       | Resolution of the generated video                                                                                                                                                                         |
| `seed`                    | integer   | No       | —       | If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. |
| `size`                    | string    | No       | —       | Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect\_ratio.                                                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "aspect_ratio": {
        "type": "string",
        "description": "Aspect ratio of the generated video",
        "enum": [
          "16:9",
          "9:16",
          "1:1",
          "4:3",
          "3:4",
          "21:9",
          "9:21"
        ]
      },
      "callback_url": {
        "type": "string",
        "description": "URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS."
      },
      "duration": {
        "type": "integer",
        "description": "Duration of the generated video in seconds"
      },
      "frame_images": {
        "type": "array",
        "description": "Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."
      },
      "generate_audio": {
        "type": "boolean",
        "description": "Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."
      },
      "input_references": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "image_url": {
              "type": "object",
              "description": "Image Url"
            },
            "type": {
              "type": "string",
              "enum": [
                "image_url"
              ],
              "description": "The type value"
            }
          },
          "required": [
            "type",
            "image_url"
          ]
        },
        "description": "Reference images to guide video generation"
      },
      "model": {
        "type": "string",
        "description": "The model value"
      },
      "prompt": {
        "type": "string",
        "description": "The prompt value"
      },
      "provider": {
        "type": "object",
        "description": "Provider-specific passthrough configuration",
        "properties": {
          "options": {
            "description": "The options value"
          }
        }
      },
      "resolution": {
        "type": "string",
        "description": "Resolution of the generated video",
        "enum": [
          "480p",
          "720p",
          "1080p",
          "1K",
          "2K",
          "4K"
        ]
      },
      "seed": {
        "type": "integer",
        "description": "If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."
      },
      "size": {
        "type": "string",
        "description": "Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio."
      }
    },
    "required": [
      "PCID",
      "model",
      "prompt"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_get\_generation

Get request & usage metadata for a generation

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `id`                      | string | Yes      | —       | The generation ID                                                                                                                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "id": {
        "type": "string",
        "description": "The generation ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_get\_models

List all models and their properties

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                                         |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                    |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                        |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                               |
| `category`                | string | No       | —       | Filter models by use case category                                                                                                                                  |
| `supported_parameters`    | string | No       | —       | Filter models by supported parameter (comma-separated)                                                                                                              |
| `output_modalities`       | string | No       | —       | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "category": {
        "type": "string",
        "description": "Filter models by use case category",
        "enum": [
          "programming",
          "roleplay",
          "marketing",
          "marketing/seo",
          "technology",
          "science",
          "translation",
          "legal",
          "finance",
          "health",
          "trivia",
          "academia"
        ]
      },
      "supported_parameters": {
        "type": "string",
        "description": "Filter models by supported parameter (comma-separated)"
      },
      "output_modalities": {
        "type": "string",
        "description": "Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_get\_videos

Poll video generation status

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `jobId`                   | string | Yes      | —       | Job Id                                                                                                                                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "jobId": {
        "type": "string",
        "description": "Job Id"
      }
    },
    "required": [
      "PCID",
      "jobId"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_embeddings\_models

List all embeddings models

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_endpoints

List all endpoints for a model

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `author`                  | string | Yes      | —       | The author/organization of the model                                                                                                             |
| `slug`                    | string | Yes      | —       | The model slug                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "author": {
        "type": "string",
        "description": "The author/organization of the model"
      },
      "slug": {
        "type": "string",
        "description": "The model slug"
      }
    },
    "required": [
      "PCID",
      "author",
      "slug"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_endpoints\_zdr

Preview the impact of ZDR on the available endpoints

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_generation\_content

Get stored prompt and completion content for a generation

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `id`                      | string | Yes      | —       | The generation ID                                                                                                                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "id": {
        "type": "string",
        "description": "The generation ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_models\_count

Get total count of available models

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                                         |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                    |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                        |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                               |
| `output_modalities`       | string | No       | —       | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "output_modalities": {
        "type": "string",
        "description": "Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_models\_user

List models filtered by user provider preferences, privacy settings, and guardrails

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_private\_models

Get a private model

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `author`                  | string | Yes      | —       | The author/organization of the model                                                                                                             |
| `slug`                    | string | Yes      | —       | The model slug                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "author": {
        "type": "string",
        "description": "The author/organization of the model"
      },
      "slug": {
        "type": "string",
        "description": "The model slug"
      }
    },
    "required": [
      "PCID",
      "author",
      "slug"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_private\_models\_endpoints

List endpoints for a private model

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `author`                  | string | Yes      | —       | The author/organization of the model                                                                                                             |
| `slug`                    | string | Yes      | —       | The model slug                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "author": {
        "type": "string",
        "description": "The author/organization of the model"
      },
      "slug": {
        "type": "string",
        "description": "The model slug"
      }
    },
    "required": [
      "PCID",
      "author",
      "slug"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_providers

List all providers

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_videos\_content

Download generated video content

**Parameters:**

| Parameter                 | Type    | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string  | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string  | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string  | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |
| `jobId`                   | string  | Yes      | —       | Job Id                                                                                                                                           |
| `index`                   | integer | No       | —       | The index value                                                                                                                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "jobId": {
        "type": "string",
        "description": "Job Id"
      },
      "index": {
        "type": "integer",
        "description": "The index value"
      }
    },
    "required": [
      "PCID",
      "jobId"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_list\_videos\_models

List all video generation models

**Parameters:**

| Parameter                 | Type   | Required | Default | Description                                                                                                                                      |
| ------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `HTTP-Referer`            | string | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. |
| `X-OpenRouter-Title`      | string | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                     |
| `X-OpenRouter-Categories` | string | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openrouter\_ai\_send\_chat\_completion\_request

Create a chat completion

**Parameters:**

| Parameter                 | Type      | Required | Default | Description                                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| ------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HTTP-Referer`            | string    | No       | —       | The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.                                                                                                              |                                                                                                                                                                                             |
| `X-OpenRouter-Title`      | string    | No       | —       | The app display name allows you to customize how your app appears in OpenRouter's dashboard.                                                                                                                                                                  |                                                                                                                                                                                             |
| `X-OpenRouter-Categories` | string    | No       | —       | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.                                                                                                                                                         |                                                                                                                                                                                             |
| `cache_control`           | object    | No       | —       | Cache Control                                                                                                                                                                                                                                                 |                                                                                                                                                                                             |
| `debug`                   | object    | No       | —       | Debug options for inspecting request transformations (streaming only)                                                                                                                                                                                         |                                                                                                                                                                                             |
| `frequency_penalty`       | number    | null     | No      | —                                                                                                                                                                                                                                                             | Frequency penalty (-2.0 to 2.0)                                                                                                                                                             |
| `image_config`            | object    | No       | —       | Provider-specific image configuration options. Keys and values vary by model/provider. See [https://openrouter.ai/docs/guides/overview/multimodal/image-generation](https://openrouter.ai/docs/guides/overview/multimodal/image-generation) for more details. |                                                                                                                                                                                             |
| `logit_bias`              | object    | No       | —       | Token logit bias adjustments                                                                                                                                                                                                                                  |                                                                                                                                                                                             |
| `logprobs`                | boolean   | null     | No      | —                                                                                                                                                                                                                                                             | Return log probabilities                                                                                                                                                                    |
| `max_completion_tokens`   | integer   | null     | No      | —                                                                                                                                                                                                                                                             | Maximum tokens in completion                                                                                                                                                                |
| `max_tokens`              | integer   | null     | No      | —                                                                                                                                                                                                                                                             | Maximum tokens (deprecated, use max\_completion\_tokens). Note: some providers enforce a minimum of 16.                                                                                     |
| `messages`                | any\[]    | Yes      | —       | List of messages for the conversation                                                                                                                                                                                                                         |                                                                                                                                                                                             |
| `metadata`                | object    | No       | —       | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)                                                                                                                                                               |                                                                                                                                                                                             |
| `modalities`              | string\[] | No       | —       | Output modalities for the response. Supported values are "text", "image", and "audio".                                                                                                                                                                        |                                                                                                                                                                                             |
| `model`                   | string    | Yes      | —       | Model to use for completion                                                                                                                                                                                                                                   |                                                                                                                                                                                             |
| `models`                  | any\[]    | No       | —       | Models to use for completion                                                                                                                                                                                                                                  |                                                                                                                                                                                             |
| `parallel_tool_calls`     | boolean   | null     | No      | —                                                                                                                                                                                                                                                             | Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.                                                    |
| `plugins`                 | any\[]    | No       | —       | Plugins you want to enable for this request, including their settings.                                                                                                                                                                                        |                                                                                                                                                                                             |
| `presence_penalty`        | number    | null     | No      | —                                                                                                                                                                                                                                                             | Presence penalty (-2.0 to 2.0)                                                                                                                                                              |
| `provider`                | object    | No       | —       | When multiple model providers are available, optionally indicate your routing preference.                                                                                                                                                                     |                                                                                                                                                                                             |
| `reasoning`               | object    | No       | —       | Configuration options for reasoning models                                                                                                                                                                                                                    |                                                                                                                                                                                             |
| `response_format`         | object    | No       | —       | Response format configuration                                                                                                                                                                                                                                 |                                                                                                                                                                                             |
| `route`                   | string    | null     | No      | —                                                                                                                                                                                                                                                             | **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). |
| `seed`                    | integer   | null     | No      | —                                                                                                                                                                                                                                                             | Random seed for deterministic outputs                                                                                                                                                       |
| `service_tier`            | string    | null     | No      | —                                                                                                                                                                                                                                                             | The service tier to use for processing this request.                                                                                                                                        |
| `session_id`              | string    | No       | —       | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.                   |                                                                                                                                                                                             |
| `stop`                    | object    | No       | —       | Stop sequences (up to 4)                                                                                                                                                                                                                                      |                                                                                                                                                                                             |
| `stream`                  | boolean   | No       | —       | Enable streaming response                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `stream_options`          | object    | No       | —       | Streaming configuration options                                                                                                                                                                                                                               |                                                                                                                                                                                             |
| `temperature`             | number    | null     | No      | —                                                                                                                                                                                                                                                             | Sampling temperature (0-2)                                                                                                                                                                  |
| `tool_choice`             | object    | No       | —       | Tool choice configuration                                                                                                                                                                                                                                     |                                                                                                                                                                                             |
| `tools`                   | any\[]    | No       | —       | Available tools for function calling                                                                                                                                                                                                                          |                                                                                                                                                                                             |
| `top_logprobs`            | integer   | null     | No      | —                                                                                                                                                                                                                                                             | Number of top log probabilities to return (0-20)                                                                                                                                            |
| `top_p`                   | number    | null     | No      | —                                                                                                                                                                                                                                                             | Nucleus sampling parameter (0-1)                                                                                                                                                            |
| `trace`                   | object    | No       | —       | Metadata for observability and tracing. Known keys (trace\_id, trace\_name, span\_name, generation\_name, parent\_span\_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.                |                                                                                                                                                                                             |
| `user`                    | string    | No       | —       | Unique user identifier                                                                                                                                                                                                                                        |                                                                                                                                                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "HTTP-Referer": {
        "type": "string",
        "description": "The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application."
      },
      "X-OpenRouter-Title": {
        "type": "string",
        "description": "The app display name allows you to customize how your app appears in OpenRouter's dashboard."
      },
      "X-OpenRouter-Categories": {
        "type": "string",
        "description": "Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings."
      },
      "cache_control": {
        "description": "Cache Control"
      },
      "debug": {
        "type": "object",
        "description": "Debug options for inspecting request transformations (streaming only)",
        "properties": {
          "echo_upstream_body": {
            "type": "boolean",
            "description": "If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode."
          }
        }
      },
      "frequency_penalty": {
        "type": [
          "number",
          "null"
        ],
        "description": "Frequency penalty (-2.0 to 2.0)"
      },
      "image_config": {
        "type": "object",
        "description": "Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."
      },
      "logit_bias": {
        "type": "object",
        "description": "Token logit bias adjustments"
      },
      "logprobs": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Return log probabilities"
      },
      "max_completion_tokens": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Maximum tokens in completion"
      },
      "max_tokens": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16."
      },
      "messages": {
        "type": "array",
        "description": "List of messages for the conversation"
      },
      "metadata": {
        "type": "object",
        "description": "Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)"
      },
      "modalities": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "text",
            "image",
            "audio"
          ]
        },
        "description": "Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."
      },
      "model": {
        "type": "string",
        "description": "Model to use for completion"
      },
      "models": {
        "type": "array",
        "description": "Models to use for completion"
      },
      "parallel_tool_calls": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response."
      },
      "plugins": {
        "type": "array",
        "description": "Plugins you want to enable for this request, including their settings."
      },
      "presence_penalty": {
        "type": [
          "number",
          "null"
        ],
        "description": "Presence penalty (-2.0 to 2.0)"
      },
      "provider": {
        "type": "object",
        "description": "When multiple model providers are available, optionally indicate your routing preference.",
        "properties": {
          "allow_fallbacks": {
            "type": "boolean",
            "description": "Whether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it's unavailable."
          },
          "data_collection": {
            "type": "string",
            "description": "Data collection setting. If no available model provider meets the requirement, your request will return an error. - allow: (default) allow providers which store user data non-transiently and may train on it  - deny: use only providers which do not collect user data.",
            "enum": [
              "deny",
              "allow"
            ]
          },
          "enforce_distillable_text": {
            "type": "boolean",
            "description": "Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."
          },
          "ignore": {
            "type": "array",
            "description": "List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."
          },
          "max_price": {
            "type": "object",
            "description": "The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."
          },
          "only": {
            "type": "array",
            "description": "List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."
          },
          "order": {
            "type": "array",
            "description": "An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message."
          },
          "preferred_max_latency": {
            "description": "Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "preferred_min_throughput": {
            "description": "Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."
          },
          "quantizations": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "int4",
                "int8",
                "fp4",
                "fp6",
                "fp8",
                "fp16",
                "bf16",
                "fp32",
                "unknown"
              ]
            },
            "description": "A list of quantization levels to filter the provider by."
          },
          "require_parameters": {
            "type": "boolean",
            "description": "Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest."
          },
          "sort": {
            "description": "The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."
          },
          "zdr": {
            "type": "boolean",
            "description": "Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."
          }
        }
      },
      "reasoning": {
        "type": "object",
        "description": "Configuration options for reasoning models",
        "properties": {
          "effort": {
            "type": "string",
            "description": "Constrains effort on reasoning for reasoning models",
            "enum": [
              "xhigh",
              "high",
              "medium",
              "low",
              "minimal",
              "none"
            ]
          },
          "summary": {
            "type": "string",
            "description": "The summary value",
            "enum": [
              "auto",
              "concise",
              "detailed"
            ]
          }
        }
      },
      "response_format": {
        "description": "Response format configuration"
      },
      "route": {
        "type": [
          "string",
          "null"
        ],
        "description": "**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: \"fallback\" (maps to \"model\"), \"sort\" (maps to \"none\").",
        "enum": [
          "fallback",
          "sort"
        ]
      },
      "seed": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Random seed for deterministic outputs"
      },
      "service_tier": {
        "type": [
          "string",
          "null"
        ],
        "description": "The service tier to use for processing this request.",
        "enum": [
          "auto",
          "default",
          "flex",
          "priority",
          "scale"
        ]
      },
      "session_id": {
        "type": "string",
        "description": "A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."
      },
      "stop": {
        "description": "Stop sequences (up to 4)"
      },
      "stream": {
        "type": "boolean",
        "description": "Enable streaming response"
      },
      "stream_options": {
        "type": "object",
        "description": "Streaming configuration options",
        "properties": {
          "include_usage": {
            "type": "boolean",
            "description": "Deprecated: This field has no effect. Full usage details are always included."
          }
        }
      },
      "temperature": {
        "type": [
          "number",
          "null"
        ],
        "description": "Sampling temperature (0-2)"
      },
      "tool_choice": {
        "description": "Tool choice configuration"
      },
      "tools": {
        "type": "array",
        "description": "Available tools for function calling"
      },
      "top_logprobs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of top log probabilities to return (0-20)"
      },
      "top_p": {
        "type": [
          "number",
          "null"
        ],
        "description": "Nucleus sampling parameter (0-1)"
      },
      "trace": {
        "type": "object",
        "description": "Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.",
        "properties": {
          "generation_name": {
            "type": "string",
            "description": "Generation Name"
          },
          "parent_span_id": {
            "type": "string",
            "description": "Parent Span Id"
          },
          "span_name": {
            "type": "string",
            "description": "Span Name"
          },
          "trace_id": {
            "type": "string",
            "description": "Trace Id"
          },
          "trace_name": {
            "type": "string",
            "description": "Trace Name"
          }
        }
      },
      "user": {
        "type": "string",
        "description": "Unique user identifier"
      }
    },
    "required": [
      "PCID",
      "messages",
      "model"
    ]
  }
  ```
</Expandable>
