artifacts command provides a unified interface for managing and inspecting artifacts created by Synth AI, including fine-tuned models, RL-trained models, and optimized prompts.
Quick Reference
| Command | Purpose |
|---|---|
artifacts list | List all artifacts (models and prompts) with filtering |
artifacts show | Show detailed information about a specific artifact |
artifacts export | Export a model to HuggingFace Hub |
artifacts download | Download optimized prompts in various formats |
Artifact ID Formats
Model IDs
Models use a prefix-based format:- Fine-tuned models:
ft:BASE_MODEL:JOB_IDorpeft:BASE_MODEL:JOB_ID - RL models:
rl:BASE_MODEL:JOB_ID
ft:Qwen/Qwen3-0.6B:job_658ba4f3a93845aapeft:Qwen/Qwen3-0.6B:job_658ba4f3a93845aarl:Qwen/Qwen3-0.6B:job_abc123def456
Prompt IDs
Prompt optimization jobs use a simple prefix format:- Canonical format:
pl_JOB_ID - Alternative format:
job_pl_JOB_ID - Bare job ID:
JOB_ID(assumed to be prompt learning)
pl_71c12c4c7c474c34job_pl_71c12c4c7c474c34
Commands
artifacts list
List all artifacts (models and prompts) with optional filtering.
Usage:
--type <TYPE>- Filter by type:models,prompts, orall(default:all)--status <STATUS>- Filter by status:succeeded,failed, orrunning(default:succeeded)--limit <N>- Maximum items per type (default: 50)--format <FORMAT>- Output format:tableorjson(default:table)
- Table format: Pretty-printed tables with summary counts for each artifact type
- JSON format: Complete JSON response with all artifact data
artifacts show
Show detailed information about a specific artifact (model or prompt).
Usage:
--format <FORMAT>- Output format:tableorjson(default:table)--verbose/-v- Show verbose details (full metadata, snapshot, etc.) - only applies to prompts
- Model ID, type, base model
- Job ID, status, creation timestamp
- Additional fields for RL models (dtype, weights path)
- Job summary (algorithm, scores, status, timestamps)
- Best optimized prompt extracted from snapshot
- Syntax-highlighted prompt text with role colors (system/user/assistant)
- All default information
- Full metadata with important fields highlighted
- Complete snapshot JSON
- All metadata keys listed
artifacts export
Export a fine-tuned or RL model to HuggingFace Hub.
Usage:
--repo-id <REPO_ID>- HuggingFace repository ID (required)--private- Make repository private (default: public)--token <TOKEN>- HuggingFace token (optional, uses backend credentials if not provided)
--token if needed.
artifacts download
Download optimized prompts in various formats.
Usage:
--output <FILE>- Output file path (default: prints to stdout)--format <FORMAT>- Output format:json,yaml, ortext(default:json)--snapshot-id <ID>- Download specific snapshot (default: best snapshot)--all-snapshots- Download all snapshots (not yet implemented)
- JSON: Complete prompt snapshot as JSON
- YAML: Human-readable YAML format (requires PyYAML)
- Text: Extracted prompt messages as plain text
Common Options
All commands support these options:--base-url <URL>- Backend base URL (default: fromBACKEND_BASE_URLenvironment variable)--api-key <KEY>- API key for authentication (default: fromSYNTH_API_KEYenvironment variable)--timeout <SECONDS>- Request timeout in seconds (default: 30.0)
Examples
List all successful prompts
Show best prompt from a job
Export model and download prompt
Get all artifacts as JSON for scripting
Authentication
The artifacts CLI uses the same authentication as other Synth AI CLI commands:- API Key: Set
SYNTH_API_KEYenvironment variable, or use--api-keyflag - Backend URL: Set
BACKEND_BASE_URLenvironment variable, or use--base-urlflag
Error Handling
The CLI provides clear error messages for common issues:- Invalid artifact ID format: Shows expected format
- Artifact not found: 404 error with helpful message
- Authentication failure: 401/403 error with guidance
- Network errors: Timeout and connection error handling
Troubleshooting
”Artifact not found” errors
- Verify the artifact ID format is correct
- Check that the artifact belongs to your organization
- Ensure you’re using the correct backend URL
”Authentication failed” errors
- Verify
SYNTH_API_KEYis set correctly - Check API key permissions
- Ensure backend URL is correct
Empty metadata in prompt details
- This may indicate the job is still running or failed
- Use
--verboseflag to see full details - Check backend logs for job status
Related Commands
synth-ai status- Check system status and job statessynth-ai train- Train new models and optimize prompts