from retab import Retab
client = Retab()
run = client.workflows.evals.runs.create(
workflow_id="wf_abc123xyz",
scope={
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
)
print(run.id, run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.create("wf_abc123xyz", {
type: "single",
evalId: "wfnodeeval_hsLEQiM61ez9Piv147MWk",
});
console.log(run.id, run.lifecycle.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
run, err := client.Workflows.Evals.Runs.Create(ctx, &retab.WorkflowEvalRunsCreateParams{
WorkflowID: "wf_abc123xyz",
Scope: &retab.WorkflowEvalRunScope{
Type: retab.WorkflowEvalRunScopeTypeSingle,
EvalID: ptr("wfnodeeval_hsLEQiM61ez9Piv147MWk"),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.create(
workflow_id: 'wf_abc123xyz',
scope: {
type: 'single',
eval_id: 'wfnodeeval_hsLEQiM61ez9Piv147MWk',
},
)
puts "#{run.id} #{run.lifecycle.status}"
use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};
use retab::resources::workflow_eval_runs::CreateParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let run = client
.workflows().evals().runs()
.create(CreateParams::new(CreateWorkflowEvalRunRequest {
workflow_id: "wf_abc123xyz".into(),
scope: Some(WorkflowEvalRunSingleScope {
type_: "single".into(),
eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(),
}.into()),
}))
.await?;
println!("{} {:?}", run.id, run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->create();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Evals.Runs.CreateAsync(
new WorkflowEvalRunsCreateOptions
{
WorkflowId = "wf_abc123xyz",
Scope = new WorkflowEvalRunSingleScope
{
EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
}
);
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).create("wf_abc123", null);
System.out.println(result);
}
}
# Single eval
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": {
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk"
}
}'
# All evals for one block
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": { "type": "block", "block_id": "block_extract_invoice" }
}'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "pending" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": null,
"completed_at": null,
"duration_ms": null
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 1,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 0
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
Create Workflow Eval Run
Create a workflow-scoped eval run.
workflow_id is the execution context. Optional scope narrows the
run to one saved eval or one block; omitted scope runs all workflow evals.
from retab import Retab
client = Retab()
run = client.workflows.evals.runs.create(
workflow_id="wf_abc123xyz",
scope={
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
)
print(run.id, run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.create("wf_abc123xyz", {
type: "single",
evalId: "wfnodeeval_hsLEQiM61ez9Piv147MWk",
});
console.log(run.id, run.lifecycle.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
run, err := client.Workflows.Evals.Runs.Create(ctx, &retab.WorkflowEvalRunsCreateParams{
WorkflowID: "wf_abc123xyz",
Scope: &retab.WorkflowEvalRunScope{
Type: retab.WorkflowEvalRunScopeTypeSingle,
EvalID: ptr("wfnodeeval_hsLEQiM61ez9Piv147MWk"),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.create(
workflow_id: 'wf_abc123xyz',
scope: {
type: 'single',
eval_id: 'wfnodeeval_hsLEQiM61ez9Piv147MWk',
},
)
puts "#{run.id} #{run.lifecycle.status}"
use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};
use retab::resources::workflow_eval_runs::CreateParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let run = client
.workflows().evals().runs()
.create(CreateParams::new(CreateWorkflowEvalRunRequest {
workflow_id: "wf_abc123xyz".into(),
scope: Some(WorkflowEvalRunSingleScope {
type_: "single".into(),
eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(),
}.into()),
}))
.await?;
println!("{} {:?}", run.id, run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->create();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Evals.Runs.CreateAsync(
new WorkflowEvalRunsCreateOptions
{
WorkflowId = "wf_abc123xyz",
Scope = new WorkflowEvalRunSingleScope
{
EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
}
);
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).create("wf_abc123", null);
System.out.println(result);
}
}
# Single eval
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": {
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk"
}
}'
# All evals for one block
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": { "type": "block", "block_id": "block_extract_invoice" }
}'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "pending" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": null,
"completed_at": null,
"duration_ms": null
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 1,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 0
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
workflow_id in the request body and
optionally narrow execution with scope. If scope is omitted, every saved
eval in the workflow runs.
The response is a run resource. Use its id with the run-id-first endpoints:
Get Workflow Eval Run, List Eval
Run Results.
The request body has a workflow context and an optional scope:
- omitted
scope- run every saved eval in the workflow. scope.type = "single"- run one saved eval byeval_id.scope.type = "block"- run every saved eval for one block byblock_id.
from retab import Retab
client = Retab()
run = client.workflows.evals.runs.create(
workflow_id="wf_abc123xyz",
scope={
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
)
print(run.id, run.lifecycle.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const run = await client.workflows.evals.runs.create("wf_abc123xyz", {
type: "single",
evalId: "wfnodeeval_hsLEQiM61ez9Piv147MWk",
});
console.log(run.id, run.lifecycle.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
run, err := client.Workflows.Evals.Runs.Create(ctx, &retab.WorkflowEvalRunsCreateParams{
WorkflowID: "wf_abc123xyz",
Scope: &retab.WorkflowEvalRunScope{
Type: retab.WorkflowEvalRunScopeTypeSingle,
EvalID: ptr("wfnodeeval_hsLEQiM61ez9Piv147MWk"),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Lifecycle.Status())
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
run = client.workflows.evals.runs.create(
workflow_id: 'wf_abc123xyz',
scope: {
type: 'single',
eval_id: 'wfnodeeval_hsLEQiM61ez9Piv147MWk',
},
)
puts "#{run.id} #{run.lifecycle.status}"
use retab::models::{CreateWorkflowEvalRunRequest, WorkflowEvalRunSingleScope};
use retab::resources::workflow_eval_runs::CreateParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let run = client
.workflows().evals().runs()
.create(CreateParams::new(CreateWorkflowEvalRunRequest {
workflow_id: "wf_abc123xyz".into(),
scope: Some(WorkflowEvalRunSingleScope {
type_: "single".into(),
eval_id: "wfnodeeval_hsLEQiM61ez9Piv147MWk".into(),
}.into()),
}))
.await?;
println!("{} {:?}", run.id, run.lifecycle);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->evals()->runs()->create();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Evals.Runs.CreateAsync(
new WorkflowEvalRunsCreateOptions
{
WorkflowId = "wf_abc123xyz",
Scope = new WorkflowEvalRunSingleScope
{
EvalId = "wfnodeeval_hsLEQiM61ez9Piv147MWk",
},
}
);
Console.WriteLine(result);
import com.retab.RetabClient;
import com.retab.workflowevalruns.WorkflowEvalRunsApi;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = new WorkflowEvalRunsApi(client).create("wf_abc123", null);
System.out.println(result);
}
}
# Single eval
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": {
"type": "single",
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk"
}
}'
# All evals for one block
curl -X 'POST' \
'https://api.retab.com/v1/workflows/evals/runs' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"workflow_id": "wf_abc123xyz",
"scope": { "type": "block", "block_id": "block_extract_invoice" }
}'
{
"id": "wfevalrun_q1z2",
"workflow_id": "wf_abc123xyz",
"workflow_version_id": "draft_2026_05_18",
"trigger": { "type": "api" },
"lifecycle": { "status": "pending" },
"timing": {
"created_at": "2026-05-18T10:00:00Z",
"started_at": null,
"completed_at": null,
"duration_ms": null
},
"eval_id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"total_evals": 1,
"counts": {
"lifecycle_counts": {
"pending": 1,
"queued": 0,
"running": 0,
"completed": 0,
"error": 0,
"cancelled": 0
},
"outcome": {
"passed": 0,
"failed": 0,
"blocked": 0
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Create a workflow eval run. Provide a workflow_id, and optionally narrow execution with scope to a single eval or one block. Omit scope to run every saved workflow eval.
Response
Successful Response
A batch execution of a workflow's evals, with overall lifecycle, timing, and pass/fail counts.
Show child attributes
Show child attributes
The eval run has been created but execution has not started.
- PendingWorkflowEvalRun
- QueuedWorkflowEvalRun
- RunningWorkflowEvalRun
- CompletedWorkflowEvalRun
- ErrorWorkflowEvalRun
- CancelledWorkflowEvalRun
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Public workflow-eval target.
The storage layer remains block-scoped today, but the API shape names the tested entity explicitly so workflow-level targets can be added later.
Show child attributes
Show child attributes
Aggregate counts for a batch of block-eval runs.
Each individual run contributes to exactly one lifecycle_counts
bucket, and additionally to one outcome bucket when
lifecycle_counts.completed is incremented.
Show child attributes
Show child attributes
Compatibility envelope only. WorkflowEval.freshness is the authoritative read-time staleness verdict for saved eval definitions.
Show child attributes
Show child attributes