Create a Run
Start executing a new Run
A Run can be started with a new message (human
) or from an existing template.
Structured output
By default, a Run result
will be a JSON object returned by the model. A specific output structure can be enforced by
providing a result.schema
value in JSON Schema form.
The Run will be forced to return a result in the provided format or null
if this is not possible.
Result handler
As an alternative to retrieving a Run result via the API, you can provide an Inferable function as a handler which will be called with the result of the Run.
Testing Runs
Providing a test
object will mark run as a test, this is used for running evaluations.
Test runs can include mock function results.
Headers
Path Parameters
Body
The prompt message, do not provide if using a prompt template
The name of the run, if not provided it will be generated
The model identifier for the run
claude-3-5-sonnet
, claude-3-5-sonnet:beta
, claude-3-haiku
An array of attached functions (Keys should be service in the format <SERVICE>_<FUNCTION>)
Run metadata which can be used to filter runs
When provided, the run will be marked as as a test / evaluation
A prompt template which the run should be created from
Enable reasoning traces
Enable summarization of oversized call results
Response
The id of the newly created run
Was this page helpful?