run_prompt_completion
Execute a prompt template with variable substitution and required billing metadata to return a model completion. Use render_prompt first to verify the template before making this billable call.
Instructions
Execute a prompt against the configured model and return the completion. This makes a billable model call, so use render_prompt first when you want to check the template and validate_completion_metadata when billing fields are uncertain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt_id | Yes | Prompt ID or slug to execute | |
| variables | Yes | Variable values to substitute into the template | |
| metadata | Yes | Billing metadata - client_id, app, env are REQUIRED for cost attribution | |
| hyperparameters | No | Override default hyperparameters |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |