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

# Upload an artifact

> Upload a text artifact for one agent.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json post /projects/{project_id}/artifacts
openapi: 3.1.0
info:
  title: Lemma Platform API
  description: Lemma Platform HTTP API for AI observability and workspace operations.
  version: 0.1.0
servers:
  - url: https://api.uselemma.ai
    description: Lemma production API
security:
  - bearerAuth: []
paths:
  /projects/{project_id}/artifacts:
    post:
      tags:
        - Artifacts
      summary: Upload an artifact
      description: Upload a text artifact for one agent.
      operationId: upload_project_artifact
      parameters:
        - name: project_id
          in: path
          required: true
          description: Project ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_name:
                  type:
                    - string
                    - 'null'
                filename:
                  type: string
                content:
                  type: string
              required:
                - agent_name
                - filename
                - content
              additionalProperties: false
      responses:
        '201':
          description: Uploaded artifact metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  agent_name:
                    type:
                      - string
                      - 'null'
                  kind:
                    type: string
                    enum:
                      - uploaded
                      - generated
                  filename:
                    type:
                      - string
                      - 'null'
                  content_type:
                    type: string
                    enum:
                      - text/plain
                      - text/markdown
                  version:
                    type:
                      - integer
                      - 'null'
                    exclusiveMinimum: 0
                  byte_length:
                    type: integer
                    minimum: 0
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                required:
                  - id
                  - agent_name
                  - kind
                  - filename
                  - content_type
                  - version
                  - byte_length
                  - created_at
                  - updated_at
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
        '415':
          description: Unsupported media type
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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