---
title: "Generate Setup Commands"
method: POST
path: "/v1/organizations/{org_id}/setup-commands/generate"
tags: ["setup-commands", "setup-commands", "setup-commands"]
---

# Generate Setup Commands

`POST /v1/organizations/{org_id}/setup-commands/generate`

Generate setup commands for a repository.

Creates and initiates a setup command generation agent for the specified repository.
The agent will analyze the repository structure and generate appropriate setup commands.

Rate limit: 5 requests per minute.

## Path parameters

- `org_id` integer, required

## Headers

- `authorization` unknown

## Request body

- GenerateSetupCommandsInput — Input for generating setup commands.
  - `repo_id` integer, required
  - `prompt` string, nullable
  - `trigger_source` string

## Response `200`

Successful Response

- SetupCommandsResponse — Response for setup commands generation.
  - `agent_run_id` integer, required
  - `status` string, required
  - `url` string, required

## Other responses

- `400` — Invalid input
- `404` — Repository not found
- `422` — Validation Error
- `500` — Internal server error

## Changes

- **2025-08-23** `d867854bc131` — 1 info
  - added the new optional request property `trigger_source`
- **2025-08-21** `a0215d4f2c07` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/codegen-sh/apis/developer-api/changes/v1/organizations/:org_id/setup-commands/generate/post.md)

---

[API](https://skmtc.dev/codegen-sh/apis/developer-api.md) · [All operations](https://skmtc.dev/codegen-sh/apis/developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codegen-sh/developer-api/revisions/e68a3133f727/schema)
