Skip to main content
POST
/
artifact
/
{artifact_type}
Create Artifact
curl --request POST \
  --url https://api.example.com/artifact/{artifact_type} \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "name": "<string>",
  "download_url": "<string>"
}
'
{
  "metadata": {
    "metadata.name": "<string>",
    "metadata.id": "<string>",
    "metadata.type": "<string>"
  },
  "data": {
    "data.url": "<string>",
    "data.download_url": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/GingerlyData247/SOTeam4-P2/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

artifact_type
string
required
Type of artifact to create. Must be one of:
  • model - Machine learning model (triggers HuggingFace ingestion)
  • dataset - Training or evaluation dataset
  • code - Code repository or training script

Authentication

Authentication headers may be required depending on deployment configuration.

Request Body

url
string
required
Source URL of the artifact. Maximum length: 2048 characters.For models: HuggingFace model URL or ID (e.g., https://huggingface.co/google-bert/bert-base-uncased or google-bert/bert-base-uncased)For datasets/code: Any valid URL pointing to the resource
name
string
Custom name for the artifact. If not provided, the name will be extracted from the URL path.
download_url
string
Optional pre-signed download URL for the artifact. If not provided, one may be automatically generated for model artifacts.

Response

Returns HTTP 201 on success with the created artifact details.
metadata
object
required
Artifact metadata
metadata.name
string
Name of the artifact
metadata.id
string
Unique identifier assigned to the artifact
metadata.type
string
Type of artifact: model, dataset, or code
data
object
required
Artifact data and URLs
data.url
string
Source URL of the artifact
data.download_url
string
Pre-signed download URL (if available)

Error Codes

  • 400 - Invalid artifact type or malformed request
  • 413 - URL exceeds maximum length (2048 characters)
  • 424 - Model ingestion rejected due to insufficient reviewedness score (< 0.5)
  • 500 - Internal server error during artifact creation

Model Artifact Behavior

When creating a model artifact, the system automatically:
  1. Normalizes the HuggingFace model ID from the URL
  2. Fetches model metadata and license information from HuggingFace
  3. Computes trustworthiness metrics (reviewedness, reproducibility, etc.)
  4. Validates reviewedness score - rejects models with reviewedness < 0.5
  5. Extracts parent dependencies for lineage tracking
  6. Creates a minimal artifact ZIP containing source URL
  7. Uploads the artifact to S3 storage
  8. Generates a pre-signed download URL

Dataset and Code Artifacts

For dataset and code artifacts:
  • No automatic metadata extraction
  • No metric computation
  • Simple registration with provided URL and name
  • No automatic storage upload (unless download_url is provided)

Examples

curl -X POST https://api.example.com/artifact/model \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://huggingface.co/google-bert/bert-base-uncased",
    "name": "BERT Base Uncased"
  }'

Response Example

{
  "metadata": {
    "name": "BERT Base Uncased",
    "id": "12345",
    "type": "model"
  },
  "data": {
    "url": "https://huggingface.co/google-bert/bert-base-uncased",
    "download_url": "https://s3.amazonaws.com/bucket/artifacts/model/12345.zip?signature=..."
  }
}

See Also

Build docs developers (and LLMs) love