Fine-Tuning API
Train custom AI models on decentralized GPUs. Powered by Bittensor Subnet 56 (Gradients).
Base URL: https://api.voltagegpu.com/api/volt/fine-tuningQuick Start
Create your first fine-tuning job with a single API call:
curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-llama-finetune",
"taskType": "text",
"model": "meta-llama/Llama-3.1-8B-Instruct",
"dsRepo": "username/my-dataset",
"hours": 2
}'Tip: Prepare your dataset on HuggingFace first. The API pulls directly from your HF repo.
Training Types
VoltageGPU supports four training methods, each suited to different use cases.
Text SFT (Supervised Fine-Tuning)
Train models on instruction/output pairs. Best for building custom instruction-following models.
Key Fields
taskType | required | Set to "text" |
fieldInstruction | optional | Column name for instruction field (default: "instruction") |
fieldOutput | optional | Column name for output field (default: "output") |
// Dataset format (JSONL)
{"instruction": "Translate to French", "output": "Traduire en français"}
{"instruction": "Summarize this text", "output": "Here is a concise summary..."}Chat SFT
Train on multi-turn conversation data. Ideal for building chatbots and conversational agents.
Key Fields
taskType | required | Set to "chat" |
chatTemplate | optional | Template format: chatml, llama3, qwen3, mistral_v3_tekken, deepseek_v3, phi_4, gemma3 |
fieldConversation | optional | Column name for conversation field (default: "conversations") |
// Dataset format (JSONL)
{"conversations": [{"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi!"}]}
{"conversations": [{"role": "user", "content": "What is ML?"}, {"role": "assistant", "content": "Machine learning is..."}]}DPO (Direct Preference Optimization)
Align models to human preferences using chosen/rejected response pairs. Best for RLHF-style alignment.
Key Fields
taskType | required | Set to "dpo" |
fieldPrompt | optional | Column name for prompt field (default: "prompt") |
fieldChosen | optional | Column name for preferred response (default: "chosen") |
fieldRejected | optional | Column name for rejected response (default: "rejected") |
chatTemplate | optional | Template format (same options as Chat SFT) |
// Dataset format (JSONL)
{"prompt": "Write a poem", "chosen": "Roses are red, violets are blue...", "rejected": "I don't write poems"}
{"prompt": "Explain gravity", "chosen": "Gravity is a fundamental force...", "rejected": "Things fall down"}GRPO (Group Relative Policy Optimization)
Train with reward functions instead of human-labeled preference data. The model learns by comparing its own outputs within a group, guided by custom reward signals.
Key Fields
taskType | required | Set to "grpo" |
fieldPrompt | optional | Column name for prompt field (default: "prompt") |
rewardFuncs | optional | Array of reward function names to use during training |
chatTemplate | optional | Template format (same options as Chat SFT) |
curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-grpo-alignment",
"taskType": "grpo",
"model": "meta-llama/Llama-3.1-8B-Instruct",
"dsRepo": "username/my-prompts",
"hours": 3,
"chatTemplate": "llama3"
}'Custom Dataset (Chat & Text)
Upload your dataset as a direct URL instead of a HuggingFace repo. Supports both chat and text SFT formats.
Key Fields
taskType | required | Set to "custom_chat" or "custom_text" |
datasetUrl | required | Direct URL to your dataset file (JSONL, CSV, or JSON) |
curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "custom-dataset-train",
"taskType": "custom_chat",
"model": "Qwen/Qwen2.5-7B-Instruct",
"datasetUrl": "https://my-server.com/data/conversations.jsonl",
"hours": 2,
"chatTemplate": "qwen3"
}'Image LoRA
Fine-tune FLUX and SDXL diffusion models with LoRA adapters. Best for custom image styles, brand assets, and characters.
Key Fields
taskType | required | Set to "image" |
imageModelType | optional | Diffusion model type: "flux" or "sdxl" (default: "flux") |
Dataset: Upload your images to a HuggingFace dataset repo. Include a metadata file mapping image filenames to captions.
Pricing
85% markup on Gradients (SN56) base rates. Charged upfront for the full job duration.
| Model Size | Price / Hour | Example Models |
|---|---|---|
| Small (1-3B) | $18.50 | Phi-4-mini, SmolLM |
| Medium (7-13B) | $27.75 | Llama-3.1-8B, Qwen2.5-7B, Mistral-7B |
| Large (30-70B) | $46.25 | Llama-3.1-70B |
| Image LoRA | $18.50 | FLUX, SDXL |
API Endpoints
List Jobs
Retrieve all your fine-tuning jobs, optionally filtered by status.
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/volt/fine-tuning | List all fine-tuning jobs | X-API-Key |
Query Parameters
status | optional | Filter by status: pending, training, evaluating, completed, failed |
Create Job
Start a new fine-tuning job.
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/volt/fine-tuning | Create a fine-tuning job | X-API-Key |
Request Body Parameters
name | required | Job name (alphanumeric, hyphens allowed) |
taskType | required | Training type: text, chat, dpo, grpo, image, custom_chat, or custom_text |
model | required | Base model ID (e.g., "meta-llama/Llama-3.1-8B-Instruct") |
dsRepo | required | HuggingFace dataset repo (e.g., "username/my-dataset") |
hours | required | Training duration in hours (1-24) |
fieldInstruction | optional | Instruction column name (text SFT) |
fieldOutput | optional | Output column name (text SFT) |
chatTemplate | optional | Chat template format (chat SFT / DPO) |
fieldConversation | optional | Conversation column name (chat SFT) |
fieldPrompt | optional | Prompt column name (DPO) |
fieldChosen | optional | Chosen response column name (DPO) |
fieldRejected | optional | Rejected response column name (DPO) |
imageModelType | optional | Image model type: flux or sdxl (image LoRA) |
Get Job Status
Retrieve the current status and details of a specific job.
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/volt/fine-tuning/:id | Get job status and details | X-API-Key |
Rename Result Model
Rename the output model after a successful training run.
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| PATCH | /api/volt/fine-tuning/:id | Rename model or backup repo | X-API-Key |
# Rename the result model
curl -X PATCH "https://api.voltagegpu.com/api/volt/fine-tuning/JOB_ID" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "rename", "modelName": "my-custom-llama-v2"}'
# Backup training repo
curl -X PATCH "https://api.voltagegpu.com/api/volt/fine-tuning/JOB_ID" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "backup"}'Cancel Job
Cancel a running or pending fine-tuning job. Jobs cancelled before training starts are automatically refunded.
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| DELETE | /api/volt/fine-tuning/:id | Cancel a fine-tuning job | X-API-Key |
Supported Base Models
Choose from popular open-source models as your fine-tuning base:
Language Models
meta-llama/Llama-3.1-8B-Instructmeta-llama/Llama-3.1-70B-InstructQwen/Qwen2.5-7B-Instructmistralai/Mistral-7B-Instruct-v0.3
Image Models
FLUX— Black Forest Labs diffusion modelSDXL— Stable Diffusion XL
Workflow
From dataset to deployed model in four steps:
Prepare Dataset
Upload your training data to a HuggingFace dataset repository in the correct format for your chosen task type.
Create Job
Submit a fine-tuning job via the API or dashboard. Choose your base model, task type, and training duration.
Monitor Progress
Track your job through its lifecycle: pending → training → evaluating → completed
Deploy or Download
Once complete, download the trained weights from HuggingFace or deploy directly via the VoltageGPU API.