REST API v1 • OpenAPI 3.1 Spec

Programmatic Swarm Control.

Dispatch autonomous QA runs, inspect real-time VLM telemetry, and trigger Pull Request patches directly from your custom deployment orchestrator.

SDK Language Examples
Production Base URL
https://api.testiva.xyz/v1
Authentication Header
Authorization: Bearer tv_live_•••
Rate Limit & SLA
1,200 req/min • 99.99%
HTTP/3
POST /v1/swarm/dispatch

Provisions an isolated fleet of Firecracker MicroVMs and dispatches the specified AI agents (`explorer`, `hunter`, `security`, `perf`) against a target staging or preview URL.

Body Parameters (JSON)

Field Type Description
target_url * string Fully qualified staging or preview deployment URL to test.
agents string[] Array of agents: ["explorer", "hunter", "security", "perf"].
concurrency integer Parallel Firecracker MicroVM instances (Default: 15, Max: 250).
auto_open_pr boolean Automatically open a GitHub/GitLab Pull Request when a bug is verified.
Request (cURL)

                                
Response 202 ACCEPTED
{
  "id": "run_tv4_99201a",
  "status": "provisioning_enclave",
  "target_url": "https://staging.acme.xyz",
  "microvms_allocated": 20,
  "estimated_duration_sec": 38,
  "stream_url": "wss://api.testiva.xyz/v1/stream/run_tv4_99201a"
}
GET /v1/swarm/runs/{run_id}

Retrieves the complete quality health score, assertion counts, Core Web Vitals, and verified bug artifacts (including video replay URLs and HAR network traces) for a swarm run.

Request (cURL)

                                
Response 200 OK
{
  "id": "run_tv4_99201a",
  "status": "completed",
  "health_score": 94,
  "assertions_executed": 412,
  "vulnerabilities_found": 1,
  "issues": [
    {
      "issue_id": "bug_8812x",
      "severity": "critical",
      "agent": "hunter",
      "title": "Negative integer overflow in /api/cart",
      "repro_video": "https://cdn.testiva.xyz/replays/bug_8812x.mp4"
    }
  ]
}
POST /v1/remediation/pr
AST Remediation Engine

Instructs the Testiva Remediation Engine to synthesize a minimal AST code patch for a verified `issue_id`, validate the patch inside a sandboxed MicroVM, and open a Pull Request against your repository.

Request (cURL)

                                
Response 201 CREATED
{
  "pr_number": 409,
  "branch": "testiva/fix-bug_8812x",
  "repository": "acme-corp/web-checkout",
  "pr_url": "https://github.com/acme-corp/web-checkout/pull/409",
  "sandbox_verification": "passed_142_assertions"
}
Real-Time Event Streams

Webhook Events & HMAC Signatures

Every webhook request includes a cryptographic X-Testiva-Signature-256 header signed with your workspace webhook secret so you can verify authenticity.


                        

HTTP Status & Error Codes

200 / 202 Accepted Swarm dispatched to enclave
401 Unauthorized Invalid or expired API token
422 Unprocessable Target URL unreachable
429 Rate Limited Exceeded 1,200 req/min