Skip to main content
POST
/
v1
/
graph-workflow
/
completions
{
  "job_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "outputs": "<any>",
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "total_tokens": 123,
    "token_cost": 123,
    "cost_per_agent": 123
  },
  "timestamp": "<string>"
}

Headers

x-api-key
string
required

Body

application/json

Input schema for GraphWorkflow completion requests.

name
string | null

The name of the graph workflow.

description
string | null

The description of the graph workflow.

agents
AgentSpec · object[] | null

List of agent specifications to be used as nodes in the workflow graph.

edges
Edges · array

List of edges connecting nodes. Can be EdgeSpec objects or dictionaries with 'source' and 'target' keys.

  • EdgeSpec
  • Option 2
entry_points
string[] | null

List of node IDs that serve as starting points for the workflow.

end_points
string[] | null

List of node IDs that serve as ending points for the workflow.

max_loops
integer | null
default:1

The maximum number of execution loops for the workflow.

task
string | null

The task to be executed by the workflow.

img
string | null

Optional image path for vision-enabled agents.

auto_compile
boolean | null
default:true

Whether to automatically compile the workflow for optimization.

verbose
boolean | null
default:false

Whether to enable detailed logging.

Response

Successful Response

Output schema for GraphWorkflow completion responses.

job_id
string
required

The job ID of the graph workflow.

status
string
required

The status of the graph workflow.

outputs
any
required

The outputs of the graph workflow.

usage
object
required

The usage statistics of the workflow.

timestamp
string
required

The timestamp of the graph workflow execution.

name
string | null

The name of the graph workflow.

description
string | null

The description of the graph workflow.