---
title: "Create test case generation request"
method: POST
path: "/api/v1/tcg"
tags: ["TCG"]
---

# Create test case generation request

`POST /api/v1/tcg`

## Request

- Base URL: `https://toolkit.browserstack.com`
- URL: `https://toolkit.browserstack.com/api/v1/tcg`
- Auth: API key in cookie `_wdt_rails_session`

Creates a new AI-powered test case generation request. Requires either an attachment, scan_id, or page_url parameter.

## Request body `multipart/form-data`

- string, binary

## Response `201`

Test case generation request created successfully

- object
  - `id` string
  - `user_id` string
  - `status` string
  - `created_at` string, date-time

## Other responses

- `400`: Bad request - missing required parameters
- `401`: Unauthorized
- `422`: Unprocessable entity - validation failed
- `429`: Rate limit exceeded - too many generations for this user (LV-3308)

---

[API](https://skmtc.dev/birdeatsbug/apis/wdt-rails-api.md) - [All operations](https://skmtc.dev/birdeatsbug/apis/wdt-rails-api/llms.txt) - [OpenAPI document](https://skmtc.dev/birdeatsbug/apis/wdt-rails-api/revisions/cbd06b547b6a?raw)
