Skip to main content
POST
/
v1
/
loops
Start a loop
curl --request POST \
  --url https://pnbr.io/v1/loops \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "kind": "graph_extraction",
  "project_id": "9142fa4d-7aad-4a1b-8f99-b522fd37518d",
  "goal": "Extract customers, initiatives, risks, and relationships from the account memo.",
  "context": {
    "source_ids": [
      "src_01JZ4..."
    ]
  },
  "schema": {
    "shape_ids": [
      "shp_customer_intelligence"
    ]
  },
  "loop": {
    "effort": "agentic",
    "max_iterations": 5,
    "quality_threshold": 8
  },
  "output": {
    "type": "delta",
    "apply": false
  }
}
'
{
  "loop_id": "<string>",
  "status": "queued",
  "goal": "<string>",
  "project_id": "<string>",
  "result": {
    "type": "delta",
    "delta_id": "<string>",
    "entity_count": 123,
    "relationship_count": 123
  },
  "poll": "<string>",
  "checkpoints": "<string>",
  "events": "<string>",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

A pnbr- API key. Project-scoped keys make project_id implicit; org-scoped keys require it.

Body

application/json
kind
enum<string>
default:graph_extraction
Available options:
graph_extraction,
hydrate
project_id
string

Required for organization-scoped keys. Project-scoped keys make this implicit.

goal
string

Natural-language objective for the loop. Required unless a hydrate request provides enough subject or purpose context.

head_delta_id
string

Optional existing delta workspace to continue from.

context
object
schema
object
loop
object
output
object
dry_run
boolean
default:false

Compile and validate the loop without starting execution or spending credits.

Response

Dry-run compile result when dry_run is true.