> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create project

> Creates a new vly project from a prompt. Returns the new Project record.

Creates a project, queues the initial agent run, and returns immediately with the project ID. Poll the project for status, or subscribe to a [webhook](/api-reference/webhooks/test) for completion.

<Note>
  Use an `Idempotency-Key` header to safely retry. Within 24 hours, repeated requests with the same key return the original response.
</Note>


## OpenAPI

````yaml POST /v1/projects
openapi: 3.1.0
info:
  title: vly.ai API
  version: 0.1.0
  description: >-
    REST API for the vly.ai AI app builder. v0, illustrative — endpoints, paths,
    and shapes may change before general availability. See the API Reference
    introduction for status.
  contact:
    name: vly.ai support
    email: support@vly.ai
    url: https://docs.vly.ai/api-reference/introduction
  license:
    name: vly.ai Terms
    url: https://vly.ai/terms
servers:
  - url: https://api.vly.ai
    description: Production
  - url: https://api.staging.vly.ai
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Create, list, update, and delete vly projects.
  - name: Deployments
    description: Trigger and inspect deployments.
  - name: Agents
    description: Trigger an AI agent run on a project.
  - name: Files
    description: Upload assets to a project.
  - name: Billing
    description: Inspect plan usage and credits.
  - name: Webhooks
    description: Send and verify webhook events.
paths:
  /v1/projects:
    post:
      tags:
        - Projects
      summary: Create project
      description: >-
        Creates a new vly project from a prompt. The project is provisioned and
        ready to deploy in seconds.
      operationId: createProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - prompt
              properties:
                name:
                  type: string
                  example: Tasks for teams
                prompt:
                  type: string
                  example: >-
                    A real-time task tracker for small teams. Each user has
                    tasks, due dates, and can assign tasks to teammates. Email
                    notifications on assignment.
                agent:
                  type: string
                  enum:
                    - claude-code
                    - openai-codex
                    - gemini-cli
                  default: claude-code
                template:
                  type: string
                  nullable: true
                  example: blank
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Project:
      type: object
      properties:
        id:
          type: string
          example: prj_01JFA8N3Z1B6Y2K7Q3X4M5R8
        name:
          type: string
          example: Tasks for teams
        prompt:
          type: string
        agent:
          type: string
          enum:
            - claude-code
            - openai-codex
            - gemini-cli
        visibility:
          type: string
          enum:
            - private
            - unlisted
            - public
        url:
          type: string
          format: uri
          example: https://tasks-for-teams.vly.app
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - agent
        - visibility
        - created_at
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: The 'prompt' field is required.
            param:
              type: string
              nullable: true
  responses:
    BadRequest:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: vly_live_...
      description: Workspace-scoped API key. Generate from Workspace settings → API keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.