Test-Lab.aiDocs
API Reference

API Reference

Authenticate and interact with the Test-Lab API

API Reference

The Test-Lab API enables you to trigger tests programmatically, perfect for CI/CD integration.

Base URL

https://test-lab.ai/api/v1

Authentication

All API requests require authentication using an API key.

Getting an API Key

  1. Go to DashboardSettingsAPI Keys
  2. Click Create API Key
  3. Copy the key (shown only once)

Store your API key securely. It cannot be retrieved after creation.

Using the API Key

Include your key in the Authorization header:

curl -X POST https://test-lab.ai/api/v1/run \
  -H "Authorization: Bearer tl_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"testPlanId": YOUR_TEST_PLAN_ID}'

API Key Format

Keys are prefixed with tl_ for easy identification:

tl_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2

Endpoints

MethodEndpointDescription
POST/v1/runTrigger test runs

Error Handling

HTTP Status Codes

CodeDescription
200Success
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
402Payment required - insufficient credits
404Not found - resource doesn't exist
429Rate limited - too many requests
500Server error

Error Response Format

{
  "error": "Error message describing the issue"
}

Credit Errors

When credits are insufficient:

{
  "error": "Insufficient credits. Please top up to continue running tests."
}

Rate Limits

  • API calls: 100 requests per minute per API key
  • Concurrent jobs: 10 parallel test runs

Environments

EnvironmentBase URL
Productionhttps://test-lab.ai/api/v1

API Versioning

The API is versioned via URL path (/v1/). We'll communicate breaking changes in advance.

SDKs

Currently, we provide cURL and code examples. SDKs coming soon.

Next Steps

On this page