Chat through the gateway
lobstack_chatSend a prompt or conversation through Lobstack Gateway and get a reply plus a receipt with serving model, token counts, USD cost, and savings reason; auto routes to a capable model by cost.
Instructions
Send a prompt or conversation through the Lobstack Gateway and get the reply plus a receipt: the model that actually served it, token counts, USD cost, and any saving with the reason it may be claimed. Model "auto" (the default) lets the router pick the cheapest model that can handle the prompt. This call spends money against the configured key's allowance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Lobstack model key, e.g. "claude-sonnet-5". Defaults to "auto", which lets Token Intelligence pick the cheapest model that can handle the prompt. lobstack_models lists the keys. | |
| prompt | No | A single user message. Use this or `messages`, not both. | |
| system | No | System prompt, prepended to the conversation. | |
| messages | No | A full conversation, OpenAI-shaped. Use this or `prompt`, not both. | |
| max_tokens | No | Cap on the reply length. | |
| temperature | No | Sampling temperature. Some served models do not accept it; the receipt says when it was dropped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The assistant's reply. | |
| model | Yes | ||
| quota | Yes | Allowance remaining, as the gateway reported it. | |
| usage | Yes | ||
| receipt | Yes | Null when the endpoint sent no receipt at all. | |
| dropped_params | Yes |