API Reference

Complete reference for Raiken's REST API endpoints, CLI commands, and configuration options. Build custom integrations and automate your testing workflow.

Browser API

DOM extraction & navigation

Test API

Generation & execution

CLI Commands

Command line interface

Configuration

Environment variables

Browser Automation API

Control browser instances, navigate pages, extract DOM, and capture screenshots.

POST
/api/browser

Initialize a new browser instance

Request Body

{
  "action": "initialize",
  "browserType": "chromium",
  "headless": true
}

POST
/api/browser

Navigate to a specific URL

Request Body

{
  "action": "navigate",
  "url": "https://example.com"
}

POST
/api/browser

Extract DOM tree from current page

Request Body

{
  "action": "extractDOM"
}

POST
/api/browser

Capture screenshot of current page

Request Body

{
  "action": "takeScreenshot",
  "screenshotOptions": {
    "fullPage": true
  }
}

Bridge API

Local HTTP API

Access Raiken's functionality programmatically via HTTP API

API Endpoint

http://localhost:3001/api

Example Usage

// Generate a test via HTTP API
const response = await fetch('http://localhost:3001/api/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    description: 'Test form submission with validation',
    url: 'https://app.example.com/contact'
  })
});

const test = await response.json();

// Save test to project
await fetch('http://localhost:3001/api/save', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    content: test.code,
    filename: 'contact-form.spec.ts'
  })
});

Need Help?

Check out our comprehensive guides or join our community for support and discussions.