Test a prompt across models
test_promptUse this when someone has a prompt (pasted, or one their app sends) and wants to know which model does it best or cheapest, how models such as GPT, Claude and Gemini compare on it, or whether a cheaper model would do. Runs it on realistic cases across several models and checks every answer. Do not use for general questions about models with no prompt to test. A prompt without {{variables}} is fine: the part that changes is found and varied. Cases and checks are drafted if left out. Spends credit, never more than max_spend_usd by estimate. Returns a test_id at once: call get_test for the results. Each call starts a new paid test, so don't call it again to follow one. Set mode to image for image generation prompts and visual checks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "test_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Set to conversation for a multi-turn test or image for image generation. Omit for text. | |
| name | No | A short name, like Support triage. | |
| cases | No | Realistic inputs, up to 50: each {values: {variable: text}}, or, for a prompt without variables, the example as plain text. | |
| tools | No | For a conversation test, up to 8 dummy tools the agent can call. Nothing real is ever run: each call gets back the result written for it. | |
| checks | No | Yes/no statements a good answer meets. In a conversation test a statement is judged against the whole transcript, and an item can also be a rule: {kind, tier, tool, args, first, then, min, max}, where kind is one of resolved, called, not_called, before, turns, valid_calls, no_loop and tier is must or stretch. | |
| models | No | IDs from list_models, up to 50, or names as the person said them (gpt, claude, gemini-4, sonnet), each matched to the newest model of its family. Default: a starting mix. For image tests, omit to compare all image models or send exact endpoint IDs (fal-ai/flux-2, fal-ai/recraft/v4/text-to-image, ideogram/v4). | |
| prompt | Yes | The prompt as it is used. Parts that change from one use to the next can be {{snake_case}} variables; with none, the changing part is found and made one. | |
| system | No | The system prompt, if any. | |
| context | No | Optional shared context: docs or a brief the app gives the model beside the prompt, the same for every case. Sent first in the system message as reference material, or in place of {{context}} if the prompt has it. Drafting and the judge read it as what the prompt is for. Up to 50,000 characters; it is sent with every call, so it counts in the cost. For several, send contexts instead. | |
| contexts | No | Instead of context: up to 8 named contexts, for an app that sends one of several briefs or document sets. Each case gets one: its own (the case's context, by name), else the default. Every version and model gets the same one for the same case. Each up to 50,000 characters, 100,000 in all. Drafted cases are spread across them. | |
| scenarios | No | For a conversation test, up to 12: one person with one thing they want. | |
| image_size | No | ||
| user_model | No | For a conversation test: the model that plays the user, the same for every model tested. Any id list_models gives; a default is used if left out. | |
| image_checks | No | ||
| max_spend_usd | No | Limit for this test. Default 50, or 2 from a chat app, never above the credit left. Models are left out, dearest first, to fit. | |
| default_context | No | The context a case that names none gets, by name: the first by default, or "none". | |
| images_per_case | No | ||
| writing_samples | No | Optional: the person's own writing (posts, emails, passages as they wrote them), at least 20 for a style check. get_test then compares the answers' habits (length, lines, emoji, punctuation, repeated phrases) with theirs. Kept private with the test, up to 500 samples of 2,000 characters each. |