Artifacts

POST /api/v1/artifacts/upload-url

Create artifact metadata and return a presigned upload URL. Request body:
{
  "model_name": "Qwen/Qwen3-0.6B",
  "dtype": "F32",
  "num_tokens": 512,
  "visibility": "private",
  "size_bytes": 1048576,
  "checksum": "sha256"
}
visibility, size_bytes, and checksum are optional and default to private, 0, and "". Response:
{
  "artifact_id": "uuid",
  "url": "https://...",
  "method": "PUT",
  "expires_at": "2026-06-15T01:00:00Z"
}
After PUTting the file to the returned URL, the artifact remains pending until confirmed via POST /api/v1/artifacts/{id}/confirm-upload or a backend process finalizes it.

GET /api/v1/artifacts

List artifacts for the active project. Response:
{
  "artifacts": [
    {
      "id": "uuid",
      "owner_id": "uuid",
      "model_name": "Qwen/Qwen3-0.6B",
      "dtype": "F32",
      "num_tokens": 512,
      "visibility": "private",
      "size_bytes": 1048576,
      "checksum": "sha256",
      "download_url": null,
      "created_at": "2026-06-15T00:00:00Z"
    }
  ]
}

GET /api/v1/artifacts/{id}

Get a single artifact and a presigned download URL. Response:
{
  "id": "uuid",
  "owner_id": "uuid",
  "model_name": "Qwen/Qwen3-0.6B",
  "dtype": "F32",
  "num_tokens": 512,
  "visibility": "private",
  "size_bytes": 1048576,
  "checksum": "sha256",
  "download_url": "https://...",
  "created_at": "2026-06-15T00:00:00Z"
}

POST /api/v1/artifacts/{id}/confirm-upload

Confirm the upload after the file is PUT to the presigned URL. The portal updates the artifact status to ready and increments the organization’s storage usage. Request body:
{
  "size_bytes": 1048576,
  "checksum": "sha256"
}
size_bytes and checksum are optional; the values from the original upload request are used when omitted.

POST /api/v1/artifacts/{id}/visibility

Change artifact visibility between private and public. Request body:
{
  "visibility": "public"
}
Returns 204 No Content on success.