import requests
url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {{
"resource": "main/your-dataset.parquet",
"base_model": "<model-canonical-name>",
"script_type": "text_to_video",
"training_params": {{
"batch_size": 1,
"caption_column": "<caption_column>",
"gradient_accumulation": 1,
"image_column": "<image_column>",
"learning_rate": 0.0002,
"lora_alpha": 16,
"lora_rank": 16,
"sample_every": 200,
"samples": [
{{
"prompt": "an ox holding a sign that says 'Oxen.ai'"
}},
{{
"prompt": "a herd of oxen running in a field"
}}
],
"steps": 3000,
"timestep_type": "weighted",
"use_lora": true
}}
}}
response = requests.post(url, headers=headers, json=data)
print(response.json())