{% extends 'base.html' %} {% block title %}API Documentation{% endblock %} {% block content %}
Programmatic access to Video AI functionality.
Get system statistics including CPU, RAM, and GPU information.
curl -H "Authorization: Bearer YOUR_API_TOKEN" {{ request.host_url }}api/stats
{
"status": "Idle",
"gpu_count": 1,
"gpus": [{"name": "NVIDIA RTX 3080", "memory_used": 0.5, "memory_total": 10.0, "utilization": 0}],
"cpu_percent": 15.2,
"ram_used": 4.2,
"ram_total": 16.0
}
Perform media analysis using AI models. Costs 10 tokens (free for admins).
model_path (string, optional): Model to use (default: "Qwen/Qwen2.5-VL-7B-Instruct")prompt (string, optional): Analysis prompt (default: "Describe this image.")file_path (string, required): Path to media fileinterval (int, optional): Frame interval for video (default: 10)curl -X POST -H "Authorization: Bearer YOUR_API_TOKEN" -H "Content-Type: application/json" -d '{
"model_path": "Qwen/Qwen2.5-VL-7B-Instruct",
"prompt": "Describe this video",
"file_path": "/path/to/video.mp4",
"interval": 30
}' {{ request.host_url }}api/analyze
{
"result": "Analysis result here...",
"tokens_used": 10,
"remaining_tokens": 90
}
List your API tokens.
curl -H "Authorization: Bearer YOUR_API_TOKEN" {{ request.host_url }}api/api_tokens
{
"tokens": [
{"id": 1, "name": "My Token", "created_at": "2024-01-01T00:00:00Z", "last_used": null}
]
}