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

# Generate Website

> API endpoint to generate a complete website based on conversation history

## Example Usage

For complete API documentation and examples, please refer to your [Swagger UI](https://localhost:8080/docs#/).

```bash theme={null}
curl -X 'POST' \
  'https://localhost:8080/codenull/ai/api/v1/generate-website' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "project_id": "123e4567-e89b-12d3-a456-426614174000"
}'
```


## OpenAPI

````yaml POST /codenull/ai/api/v1/generate-website
openapi: 3.1.0
info:
  title: codenull-ai-backend
  version: 0.1.0
servers: []
security: []
paths:
  /codenull/ai/api/v1/generate-website:
    post:
      tags:
        - generate-website-post
      summary: Generate Website Post
      description: >-
        Endpoint to start an asynchronous website generation process.


        This endpoint:

        2. Creates a record in the database with status PENDING

        3. Starts an asynchronous background task to generate the website

        4. Returns immediately with the generation ID that can be used to check
        status


        You can specify which LLM provider to use (nvidia or azure). If not
        specified, 

        default is used. When using azure, the system will automatically fall
        back to 

        nvidia if Azure encounters any errors.
      operationId: api-generate_website_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateWebsiteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebsiteGenerationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GenerateWebsiteRequest:
      properties:
        project_id:
          type: string
          title: Project Id
          description: Project ID as UUID
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: >-
            LLM provider to use (nvidia or azure). If not specified, default is
            used.
      type: object
      required:
        - project_id
      title: GenerateWebsiteRequest
    WebsiteGenerationResponse:
      properties:
        generation_id:
          type: string
          title: Generation Id
          description: Generation ID as UUID
        project_id:
          type: string
          title: Project Id
          description: Project ID as UUID
        status:
          $ref: '#/components/schemas/GenerationStatus'
          description: Status of the generation process
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the generation was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the generation was last updated
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: Additional information about the generation process
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
          description: Website version number
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: LLM provider used for generation (nvidia or azure)
      type: object
      required:
        - generation_id
        - project_id
        - status
        - created_at
        - updated_at
      title: WebsiteGenerationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GenerationStatus:
      type: string
      enum:
        - PENDING
        - GENERATING_PLAN
        - GENERATING_WEBSITE
        - COMPLETED
        - FAILED
      title: GenerationStatus
    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

````