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

# Generate a strict-schema artifact, verify it, and repair at most once



## OpenAPI

````yaml /api-reference/openapi.json post /api/artifacts/generate
openapi: 3.1.0
info:
  title: WriterzRoom API
  version: '2.0'
  description: >-
    Generated from the API server by scripts/generate_api_reference.py. Only the
    endpoints listed on the Endpoints Reference page are included.
servers:
  - url: https://api.writerzroom.com
security:
  - bearerAuth: []
tags:
  - name: Generation
  - name: Content
  - name: Catalog
  - name: Approvals
  - name: Validity
  - name: Replay
  - name: Artifacts
  - name: Corpus
  - name: Account
paths:
  /api/artifacts/generate:
    post:
      tags:
        - Artifacts
      summary: Generate a strict-schema artifact, verify it, and repair at most once
      operationId: generate_api_artifacts_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateArtifactRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Generate Api Artifacts Generate Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerateArtifactRequest:
      properties:
        artifact_type:
          type: string
          title: Artifact Type
          description: Registered artifact type, e.g. 'legal_analysis'.
        prompt:
          type: string
          minLength: 20
          title: Prompt
          description: What the artifact should cover.
        vertical:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertical
          description: Vertical id supplying verification policy.
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Model to use; must be one the artifact route allows.
      type: object
      required:
        - artifact_type
        - prompt
      title: GenerateArtifactRequest
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A WriterzRoom API key.

````

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