> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codegen.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Setup Commands

> 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.



## OpenAPI

````yaml api-reference/openapi3.json post /v1/organizations/{org_id}/setup-commands/generate
openapi: 3.1.0
info:
  title: Developer API
  description: API for application developers
  version: 1.0.0
servers:
  - url: https://api.codegen.com
    description: Codegen API
security: []
paths:
  /v1/organizations/{org_id}/setup-commands/generate:
    post:
      tags:
        - setup-commands
        - setup-commands
        - setup-commands
      summary: Generate Setup Commands
      description: >-
        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.
      operationId: >-
        generate_setup_commands_v1_organizations__org_id__setup_commands_generate_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: integer
            title: Org Id
        - name: authorization
          in: header
          required: false
          schema:
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateSetupCommandsInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupCommandsResponse'
        '400':
          description: Invalid input
        '404':
          description: Repository not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    GenerateSetupCommandsInput:
      properties:
        repo_id:
          type: integer
          title: Repo Id
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        trigger_source:
          type: string
          title: Trigger Source
          default: setup-commands
      type: object
      required:
        - repo_id
      title: GenerateSetupCommandsInput
      description: Input for generating setup commands.
    SetupCommandsResponse:
      properties:
        agent_run_id:
          type: integer
          title: Agent Run Id
        status:
          type: string
          title: Status
        url:
          type: string
          title: Url
      type: object
      required:
        - agent_run_id
        - status
        - url
      title: SetupCommandsResponse
      description: Response for setup commands generation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````