---
title: "Upload an artifact"
url: "https://real-estate-agency.apim.eu/apis/agent-deployments/versions/3a3ada6b-888e-498a-bfb3-a134ac91f753/operations/uploadAgentArtifact"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/agent-deployments/versions/3a3ada6b-888e-498a-bfb3-a134ac91f753.md

# Upload an artifact

`POST` `/agents/{agentId}/artifacts`

Operation ID: `uploadAgentArtifact`

Model cards, architecture diagrams and evaluation reports are attached to the agent, not to a catalog entry.

## Path parameters

- `agentId` (string, required)

## Request body (required)

Content types: `multipart/form-data`

## Responses

- `201` - Uploaded
- `413` - File too large (limit 25 MB)

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Agent Deployments
  version: 1.0.0
servers:
  - url: https://api.nexora.example/v1
    description: Production
  - url: https://sandbox.api.nexora.example/v1
    description: Sandbox
paths:
  /agents/{agentId}/artifacts:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
          example: agt_8f2c1a
    post:
      tags:
        - Artifacts
      summary: Upload an artifact
      description: Model cards, architecture diagrams and evaluation reports are
        attached to the agent, not to a catalog entry.
      operationId: uploadAgentArtifact
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - category
              properties:
                file:
                  type: string
                  format: binary
                category:
                  $ref: "#/components/schemas/ArtifactCategory"
                order:
                  type: integer
                  minimum: 1
                  example: 1
                caption:
                  type: string
                  maxLength: 160
      responses:
        "201":
          description: Uploaded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Artifact"
        "413":
          description: File too large (limit 25 MB)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
security:
  - apiKey: []
components:
  schemas:
    ArtifactCategory:
      type: string
      enum:
        - model_card
        - architecture_diagram
        - evaluation_report
        - compliance_certification
        - document
    Artifact:
      type: object
      properties:
        id:
          type: string
          example: art_31c9
        category:
          $ref: "#/components/schemas/ArtifactCategory"
        url:
          type: string
          format: uri
          example: https://cdn.nexora.example/agents/agt_8f2c1a/art_31c9.pdf
        order:
          type: integer
          example: 1
        caption:
          type: string
          example: Model card for the pilot deployment
        size_bytes:
          type: integer
          example: 2418112
    Error:
      type: object
      description: Uniform error format across all Nexora AI APIs.
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: validation_failed
        message:
          type: string
          example: Compliance disclosures from the certification are missing.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: compliance_certification.valid_until
        reason:
          type: string
          example: missing
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Nexora AI portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
