> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.ai.openrouter.SendPrompt

- Component: `appmixer.ai.openrouter.SendPrompt`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.ai.openrouter 1.1.4](https://connectors.appmixer.com/connector/appmixer.ai.openrouter/1.1.4.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.ai.openrouter/1.1.4/component/appmixer.ai.openrouter.SendPrompt>

Send a prompt to a Large Language Model and receive a response.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Prompt (`prompt`) | textarea | - |
| Model (`model`) | text | ID of the model to use. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Answer (`answer`) | string | - |
| Prompt (`prompt`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.ai.openrouter.SendPrompt",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Send a prompt to a Large Language Model and receive a response.",
  "auth": {
    "service": "appmixer:ai:openrouter"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "inspector": {
        "inputs": {
          "prompt": {
            "label": "Prompt",
            "type": "textarea",
            "index": 1
          },
          "model": {
            "type": "text",
            "index": 2,
            "label": "Model",
            "tooltip": "ID of the model to use.",
            "defaultValue": "gpt-4o",
            "source": {
              "url": "/component/appmixer/ai/openrouter/ListModels?outPort=out",
              "data": {
                "transform": "./ListModels#toSelectOptions"
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Answer",
          "value": "answer",
          "schema": {
            "type": "string",
            "example": "The capital of France is Paris."
          }
        },
        {
          "label": "Prompt",
          "value": "prompt",
          "schema": {
            "type": "string",
            "example": "What is the capital of France?"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
