Skip to content

Stop Run

POST
/v1/runs/{run_id}/stop
curl --request POST \
--url https://example.com/v1/runs/example/stop \
--header 'Authorization: Bearer <token>'

Stop after the calls in flight. The chunk in progress is redone on resume, for free.

run_id
required
Run Id
string

Successful Response

Media typeapplication/json
Run
object
id
required
Id
string
dataset_id
required
Dataset Id

The dataset it makes.

string
status
required
Status
string
Allowed values: queued running stopping stopped done failed
config
required
RunRequest

The query and tasks it was started with.

object
sql
Sql

Which rows to ask about: a SELECT over data returning __row_id; all rows by default.

string
default: SELECT * FROM data
tasks
required
Tasks
Array<object>
Task
object
id
required
Id
string
template
required
Template

The prompt, e.g. “Is this review negative? {{review}}”.

string
""
type
required
Type
string
default: yes_no
Allowed values: yes_no pick_one pick_any scale extract write
preset
required
Any of:
string
Allowed values: summarize translate
column
required
Column

Base name of the result columns. Defaults to one for the type.

string
default: answer
extraction_mode
required
Extraction Mode

Extraction editor: one scalar value or named, typed fields.

string
default: structure
Allowed values: single structure
options
required
Options

The choices for pick one and pick any; the levels, lowest first, for scale.

Array<object>
default:
Option
object
name
required
Name
string
description
Description
string
""
fields
required
Fields

For extract: what to pull out. "amount:number" is short for {"name": "amount", "type": "number"}.

Array<object>
default:
ExtractField
object
name
required
Name
string
type
required
Type
string
default: text
Allowed values: text number boolean date list items
description
required
Description

What to put in it, if the name doesn’t say.

string
""
fields
required
Array<object> recursive
reason
required
Reason

Also write why, from LLMs, for classify and extract.

boolean
models
required
Models

Decision models or LLMs; see GET /v1/utils/models. Defaults to one for the type.

Array<string>
default: typesafe/jev-1.14
columns
required
Columns

The answer columns, each with a _proba column.

Array<string>
costs
required
Costs

Per task and model, so far.

Array<object>
TaskModelCost
object
task_id
required
Task Id
string
model
required
Model
string
cost
required
Cost

USD spent by this run; cached answers are free.

number
failed
required
Failed

Rows without an answer.

integer
row_count
required
Row Count

Rows it asks about: the rows in its scope.

integer
next_chunk
required
Next Chunk

The first chunk of rows not yet written.

integer
done
required
Done

Model calls answered (or failed) so far.

integer
total
required
Total

Model calls the run makes.

integer
cost
required
Cost

USD spent so far; cached answers are free.

number
error
required
Any of:
string
created_by
required
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Any of:
string format: date-time

Example

{
"status": "queued",
"config": {
"sql": "SELECT * FROM data",
"tasks": [
{
"template": "",
"type": "yes_no",
"preset": "summarize",
"column": "answer",
"extraction_mode": "single",
"options": [],
"fields": [],
"reason": false,
"models": [
"typesafe/jev-1.14"
]
}
]
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}