Military Artillery K9 API Reference
Unified REST endpoint for high-speed model inference, asynchronous background pipelines, and real-time execution status.
Bearer Token Authentication
All requests to the LumozAI API require authentication using your secret API key. Pass your key in the standard Authorization HTTP header as a Bearer token.
curl -X POST https://lumozai.com/api/v4/run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-d "model_id=military-artillery-k9" \
-d "prompt=A futuristic cityscape illuminated by neon bioluminescence"
<?php
$apiKey = 'YOUR_API_KEY';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://lumozai.com/api/v4/run',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'model_id' => 'military-artillery-k9',
'prompt' => 'A futuristic cityscape illuminated by neon bioluminescence'
],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer ' . $apiKey
]
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
print_r($result);
Execute Military Artillery K9 Inference
Submit a synchronous or asynchronous generation job for Military Artillery K9 (military-artillery-k9). Fast-running image models return the generated asset directly; longer inference pipelines return a request_id for asynchronous polling.
Request Parameters for Military Artillery K9
12 total fields| Parameter | Type | Required | Default | Description / Allowed Values |
|---|---|---|---|---|
model_id
|
string | Required | military-artillery-k9 |
Unique model identifier. Must be set to
military-artillery-k9. |
prompt
Prompt
|
string | Required |
battle, self-propelled artillery '...
|
Describe what you want to generate
|
aspect_ratio
Aspect Ratio
|
enum | Required |
1:1
|
Aspect ratio for the generated image
1:1
16:9
21:9
3:2
2:3
4:5
5:4
3:4
4:3
9:16
9:21
|
prompt_strength
Prompt Strength
|
number | Optional |
0.8
|
Prompt strength when using img2img. 1.0 corresponds to full destruction of information in image
Range:
0 to 1
(step: 0.01) |
num_inference_steps
Inference Steps
|
number | Optional |
28
|
Number of denoising steps. Recommended range is 28-50, and lower number of steps produce lower quality outputs, faster.
Range:
1 to 50
(step: 1) |
guidance
Guidance Scale
|
number | Optional |
3
|
Guidance for generated image
Range:
0 to 10
(step: 0.01) |
seed
Seed
|
number | Optional | — |
Random seed. Set for reproducible generation
|
output_format
Output Format
|
enum | Optional |
webp
|
Format of the output images
webp
jpg
png
|
output_quality
Output Quality
|
number | Optional |
80
|
Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs
Range:
0 to 100
(step: 1) |
lora_scale
LoRA Scale
|
number | Optional |
1
|
Determines how strongly the main LoRA should be applied. Sane results between 0 and 1 for base inference. For go_fast we apply a 1.5x multiplier to this value.
Range:
-1 to 3
(step: 0.01) |
megapixels
Resolution
|
enum | Optional |
1
|
Approximate number of megapixels for generated image
1
0.25
|
webhook |
string (URL) | Optional | — | Optional callback URL to receive an HTTP POST when async generation completes. |
Model-Specific Integration Code
Copy-paste production snippets configured with military-artillery-k9 and tailored parameter inputs.
curl -X POST https://lumozai.com/api/v4/run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-d "model_id=military-artillery-k9" \
-d "prompt=battle, self-propelled artillery 'K9'" \
-d "aspect_ratio=1:1" \
-d "prompt_strength=0.8" \
-d "num_inference_steps=28" \
-d "guidance=3" \
-d "seed=25" \
-d "output_format=webp" \
-d "output_quality=80" \
-d "lora_scale=1" \
-d "megapixels=1"
import requests
url = "https://lumozai.com/api/v4/run"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json"
}
payload = {
"model_id": "military-artillery-k9",
"prompt": "battle, self-propelled artillery 'K9'",
"aspect_ratio": "1:1",
"prompt_strength": 0.8,
"num_inference_steps": 28,
"guidance": 3,
"seed": 25,
"output_format": "webp",
"output_quality": 80,
"lora_scale": 1,
"megapixels": 1
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
<?php
$apiKey = 'YOUR_API_KEY';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://lumozai.com/api/v4/run',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'model_id' => 'military-artillery-k9',
'prompt' => 'battle, self-propelled artillery \'K9\'',
'aspect_ratio' => '1:1',
'prompt_strength' => 0.8,
'num_inference_steps' => 28,
'guidance' => 3,
'seed' => 25,
'output_format' => 'webp',
'output_quality' => 80,
'lora_scale' => 1,
'megapixels' => 1
],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer ' . $apiKey
]
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
print_r($result);
const response = await fetch('https://lumozai.com/api/v4/run', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
"model_id": "military-artillery-k9",
"prompt": "battle, self-propelled artillery 'K9'",
"aspect_ratio": "1:1",
"prompt_strength": 0.8,
"num_inference_steps": 28,
"guidance": 3,
"seed": 25,
"output_format": "webp",
"output_quality": 80,
"lora_scale": 1,
"megapixels": 1
})
});
const data = await response.json();
console.log(data);
Response Structure (200 OK)
{
"success": true,
"data": {
"request_id": 982348712938172,
"output": "https://lumozai.com/storage/outputs/result_military-artillery-k9_9823.png",
"output_type": "image"
}
}
Poll Asynchronous Task Status
Poll the current execution state of an asynchronous job using the returned request_id.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request_id |
integer | Required | The unique job ID returned when calling /api/v4/run. |
{
"success": true,
"data": {
"request_id": 982348712938172,
"status": "completed",
"output": "https://lumozai.com/storage/outputs/video_8172.mp4",
"output_type": "video"
}
}
{
"success": true,
"data": {
"request_id": 982348712938172,
"status": "processing",
"progress": 68
}
}
Standard Error Codes
The API uses conventional HTTP response codes to indicate success or failure. In general, 2xx indicates success, 4xx indicates client input issues, and 5xx indicates server errors.
| Status | Error Code | Description |
|---|---|---|
| 401 | authentication_failed |
Missing or invalid Authorization Bearer header. |
| 403 | permission_denied |
Insufficient credits or account tier permissions. |
| 404 | model_not_found |
The specified model_id does not exist or is deprecated. |
| 422 | validation_error |
Missing required parameters or invalid parameter types. |
| 429 | rate_limit_exceeded |
Request rate quota exceeded for your tier. |
| 500 | internal_server_error |
Downstream GPU compute error or worker timeout. |
{
"success": false,
"error": {
"code": "validation_error",
"message": "The model_id field is required.",
"details": {
"model_id": ["The model_id field is required."]
}
}
}
Quota & Throughput Limits
Rate limits are enforced per API key to guarantee fair access and consistent low latency across GPU workers. Every API response includes informative headers:
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum number of requests permitted per rolling hour. |
X-RateLimit-Remaining |
Number of remaining requests in the active window. |
X-RateLimit-Reset |
Unix epoch timestamp when the current window refreshes. |
X-RateLimit-Reset or implement an exponential backoff retry mechanism. Need custom enterprise rate limits? Contact our team.