get_job_status
Check the status of a generation job and retrieve the result URL once completed. Ideal for monitoring long-running video or music tasks without using credits.
Instructions
Check the status of a generation job.
Use this to check on long-running jobs (especially video and music) or to retrieve the result URL of a completed job. No credits charged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job ID returned from a generate call |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/yaparai/tools/jobs.py:8-27 (handler)The get_job_status async function that implements the tool logic. It creates a client and delegates to client.get_job().
async def get_job_status( job_id: str, ) -> dict: """ Check the status of a generation job. Use this to check on long-running jobs (especially video and music) or to retrieve the result URL of a completed job. No credits charged. Args: job_id: The job ID returned from a generate call Returns: Dict with job_id, status (pending/processing/succeeded/failed), mode, result_url (when done), error_message (if failed), and created_at timestamp. """ client = YaparAIClient() return await client.get_job(job_id) - src/yaparai/client.py:130-132 (helper)The YaparAIClient.get_job() method that makes the actual HTTP GET request to /v1/public/jobs/{job_id}.
async def get_job(self, job_id: str) -> dict: """Get job status and result.""" return await self._request("GET", f"/v1/public/jobs/{job_id}") - src/yaparai/server.py:187-187 (registration)Registration of get_job_status as an MCP tool via mcp.tool(get_job_status) on the FastMCP server.
mcp.tool(get_job_status) - src/yaparai/server.py:106-106 (registration)Import of get_job_status from yaparai.tools.jobs into the server module.
from yaparai.tools.jobs import get_job_status - src/yaparai/tools/jobs.py:8-27 (schema)The docstring serves as the schema definition: accepts job_id (str), returns a dict with job_id, status, mode, result_url, error_message, created_at.
async def get_job_status( job_id: str, ) -> dict: """ Check the status of a generation job. Use this to check on long-running jobs (especially video and music) or to retrieve the result URL of a completed job. No credits charged. Args: job_id: The job ID returned from a generate call Returns: Dict with job_id, status (pending/processing/succeeded/failed), mode, result_url (when done), error_message (if failed), and created_at timestamp. """ client = YaparAIClient() return await client.get_job(job_id)