Retrieve Agent Job Status and Results
November 24, 2025
Table of contents
Retrieve the status and results of an agent job. Jobs are stored for 31 days after creation.
Use this endpoint to check the progress of asynchronous agent jobs created with POST agent using async: true.
https://api.useapi.net/v1/minimax/agent/
jobId
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Path Parameters
jobIdis required. The job ID to query.
Responses
-
Job found and returned successfully.
Started Job:
{ "jobId": "p123456789-u12345-a67890-bot:minimax", "status": "started", "created": "2025-11-23T12:34:56.789Z", "request": { "prompt": "Generate a video of a cat playing piano", "models": ["hailuo-2.3"], "async": true } }Completed Job:
{ "jobId": "p123456789-u12345-a67890-bot:minimax", "status": "completed", "created": "2025-11-23T12:34:56.789Z", "request": { "prompt": "Generate a video of a cat playing piano", "models": ["hailuo-2.3", "nano-banana-2"] }, "response": { "projectID": "123456789", "sectionID": "987654321", "chatID": "456789123", "msg_content": "I've generated a video of a cat playing piano and an image variation.", "timestamp": 1732366496789, "elapsedTime": "02:15", "attachments": [ { "attachmentID": "att_123456789", "type": 1, "status": 3, "file": { "fileName": "cat_piano_video.mp4", "fileUrl": "https://cdn.hailuoai.video/...mp4", "type": "video/mp4" } }, { "attachmentID": "att_987654321", "type": 2, "status": 3, "file": { "fileName": "cat_piano_image.png", "fileUrl": "https://cdn.hailuoai.video/...png", "type": "image/png" } } ] } }Failed Job:
{ "jobId": "p123456789-u12345-a67890-bot:minimax", "status": "failed", "created": "2025-11-23T12:34:56.789Z", "request": { "prompt": "Generate a video", "models": ["hailuo-2.3"] }, "error": { "message": "Timeout waiting for assistant response", "status": 504 } } -
Invalid job ID format or access denied.
{ "error": "Error …", "code": 400 } -
Invalid API token.
{ "error": "Unauthorized", "code": 401 } -
Job not found or expired after 31 days.
{ "error": "Job not found or expired after 31 days", "code": 404 }
Model
{
// Job metadata
jobId: string // Unique job identifier
status: 'started' | 'completed' | 'failed' // Job status
created: string // ISO 8601 timestamp
code?: number // HTTP status code (optional)
// Original request
request: {
prompt: string // User's prompt
file?: Array<{ // File metadata (actual files not included)
name: string
size: number
type: string
}>
models: string[] // Model IDs used
async?: boolean // Async mode flag
replyUrl?: string // Callback URL
replyRef?: string // User's reference ID
}
// Agent response (only present when status is 'completed')
response?: {
projectID: string // MiniMax project ID
sectionID: string // MiniMax section ID
chatID: string // MiniMax chat ID
msg_content: string // Agent's response message
timestamp: number // Response timestamp (milliseconds since epoch)
elapsedTime: string // Elapsed time (mm:ss format)
attachments?: Array<{ // Generated files
attachmentID: string // Attachment identifier
type: number // Attachment type (numeric)
status: number // Attachment status (3 = completed)
file: {
fileName: string // File name
fileUrl: string // CDN URL to download file
extra?: Record<string, any> // Additional file metadata
posterUrl?: string // Poster/thumbnail URL
type?: string // File MIME type
referenceType?: number // Reference type
}
text?: string // Associated text content
extra?: Record<string, any> // Additional metadata
node?: Record<string, any> // Node information (if applicable)
}>
}
// Error information (only present when status is 'failed')
error?: string | { // Error can be a string or object
message: string // Error description
status: number // HTTP status code
details?: any // Additional error details
}
}
Examples
-
curl -H "Authorization: Bearer YOUR_API_TOKEN" \ "https://api.useapi.net/v1/minimax/agent/p123456789-u12345-a67890-bot:minimax" -
const token = "YOUR_API_TOKEN"; const jobId = "p123456789-u12345-a67890-bot:minimax"; const apiUrl = `https://api.useapi.net/v1/minimax/agent/${jobId}`; const response = await fetch(apiUrl, { headers: { 'Authorization': `Bearer ${token}` } }); const job = await response.json(); console.log('Job status:', job.status); if (job.status === 'completed' && job.response?.attachments) { job.response.attachments.forEach(att => { console.log(`${att.file.fileName}: ${att.file.fileUrl}`); }); } else if (job.status === 'failed') { console.error('Job failed:', job.error); } -
import requests token = "YOUR_API_TOKEN" job_id = "p123456789-u12345-a67890-bot:minimax" api_url = f"https://api.useapi.net/v1/minimax/agent/{job_id}" response = requests.get( api_url, headers={'Authorization': f'Bearer {token}'} ) job = response.json() print(f"Job status: {job['status']}") if job['status'] == 'completed' and job.get('response', {}).get('attachments'): for att in job['response']['attachments']: print(f"{att['file']['fileName']}: {att['file']['fileUrl']}") elif job['status'] == 'failed': print(f"Job failed: {job['error']}")