Overview
The Simulations API allows you to create, monitor, and manage simulation jobs. Simulations run asynchronously and can be tracked via status polling.Job Lifecycle
- PENDING - Job created and queued
- RUNNING - Job is executing
- COMPLETED - Job finished successfully
- FAILED - Job encountered an error
- CANCELLED - Job was cancelled by user
Create Simulation
Create a new simulation job. The job runs asynchronously in the background.POST /simulations
Request Body
Template ID (see
/simulations/templates)Number of entities (uses template default if not provided)
Number of timepoints (uses template default if not provided)
Temporal mode:
FORWARD, PORTAL, BRANCHING, DIRECTORIAL, or CYCLICALHuman-readable description
Custom simulation configuration (overrides template defaults)
Response
Status:202 Accepted
Unique job identifier
Current status (PENDING)
Creation timestamp
Template used
Job description
Number of entities
Number of timepoints
Temporal mode
User who created the job
Rate Limits
- Free: 1 concurrent job
- Basic: 3 concurrent jobs
- Pro: 10 concurrent jobs
- Enterprise: Unlimited
Get Simulation
Get details about a specific simulation job.GET /simulations/{job_id}
Response
Returns a job object with updated status and progress information.Errors
404 Not Found- Job doesn’t exist403 Forbidden- Not the job owner
List Simulations
List your simulation jobs with optional filtering.GET /simulations
Query Parameters
Filter by status:
PENDING, RUNNING, COMPLETED, FAILED, or CANCELLEDPage number
Jobs per page (1-100)
Response
Array of job objects
Total number of jobs
Current page
Page size
Get Simulation Result
Get detailed results for a completed simulation.GET /simulations/{job_id}/result
Response
Job metadata
Created entities (future: will load from database)
Created timepoints (future: will load from database)
Entity relationships
Simulation summary
Generated narrative exports
Simulation convergence score
Robustness grade
Errors
400 Bad Request- Job is not completed404 Not Found- Job doesn’t exist403 Forbidden- Not the job owner
Cancel Simulation
Cancel a running or pending simulation.POST /simulations/{job_id}/cancel
Request Body
Cancellation reason (optional)
Response
Returns the job object with statusCANCELLED.
Errors
400 Bad Request- Job cannot be cancelled (already completed/failed)404 Not Found- Job doesn’t exist403 Forbidden- Not the job owner
Get Statistics
Get statistics about your simulation jobs.GET /simulations/stats
Response
Total jobs created
Jobs pending
Jobs running
Jobs completed
Jobs failed
Jobs cancelled
Total cost across all jobs
Total tokens used
List Templates
List available simulation templates.GET /simulations/templates
Query Parameters
Filter by category
Filter by tier (quick/standard/stress)
Response
Array of template objects
Total template count
Available categories
Get Template
Get details about a specific template.GET /simulations/templates/{template_id}
Response
Returns a template object with all details.Errors
404 Not Found- Template doesn’t exist

