send-message
Chat with a model and get its plain-text response, to test a prompt or compare models without leaving the editor. Model slug suffixes activate routing variants: ":online" enables web search (e.g. "deepseek/deepseek-v4-pro:online"), ":nitro" prioritizes throughput, ":floor" prioritizes lowest price, ":free" uses a free endpoint if one exists. For normal chats, omit "provider" and let the router choose. Set "provider" to pin the upstream provider only when you need zero variance, such as running evals or reproducing a result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model slug, e.g. "openai/gpt-4o-mini" | |
| system | No | Optional system prompt | |
| message | Yes | The user message to send | |
| provider | No | Provider routing preferences. Leave this unset for normal chats so the router picks the best provider. Set it ONLY when the request needs zero provider variance — running evals, benchmarking, or reproducing a result — because providers differ in quantization, throughput, and sampling, so the same model can return different outputs depending on who serves it. To hard-pin one provider: { only: ["fireworks"], allow_fallbacks: false }. | |
| max_tokens | No | Cap the total tokens generated (including reasoning). The single most effective lever to stop a reasoning model from running unbounded on a hard prompt. Omit for the model default. | |
| timeout_ms | No | Abort the call locally after this many milliseconds. Returns a typed client_timeout error with elapsed_ms. If the timeout fires before any response, no generation id is available; if it fires while reading the response body, the generation may have completed upstream and been billed. Omit to wait for the default gateway timeout. | |
| reasoning_effort | No | How hard a reasoning model should think: "max" | "xhigh" | "high" | "medium" | "low" | "minimal" | "none". Omit to use the model's own default. Use a lower value to cap cost/latency on reasoning models that over-think, or a higher value for hard prompts. Non-reasoning models ignore it. Discover a model's supported/default efforts via list-models or get-model. |