Skip to content
Dashboard
API Reference

Get Agent Run ​

Get status and outputs for a run.

Poll this endpoint to check the status of your agent run and retrieve outputs.

Request ​

bash
curl -X GET "https://api.mosaic.so/agent_run/[run_id]" \
  -H "Authorization: Bearer mk_your_api_key"

Response ​

json
{
  "agent_id": "123e4567-e89b-12d3-a456-789012345678",
  "started_at": "2025-01-10T14:30:00Z",
  "status": "completed",
  "status_message": null,
  "needs_credits": false,
  "errors": [],
  "node_status_counts": {
    "completed": 10,
    "in_progress": 0,
    "failed": 0
  },
  "inputs": [
    {
      "video_url": "https://storage.googleapis.com/mosaic-inputs/...",
      "thumbnail_url": "https://storage.googleapis.com/mosaic-inputs/..."
    }
  ],
  "outputs": [
    {
      "id": "7ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "video_url": "https://storage.googleapis.com/mosaic-outputs/...",
      "thumbnail_url": "https://storage.googleapis.com/mosaic-thumbnails/...",
      "premiere_prproj_url": "https://storage.googleapis.com/mosaic-outputs/.../timeline.zip?...",
      "sources": [
        {
          "provider": "getty",
          "source_kind": "licensed_library",
          "media_type": "image",
          "provider_asset_id": "1234567890",
          "render_asset_id": "getty_image_000",
          "query": "mayor press conference",
          "title": "Mayor speaks at press conference",
          "credit": "Photographer / Collection",
          "source_url": "https://www.gettyimages.com/detail/...",
          "display_url": "https://media.gettyimages.com/...",
          "rights_status": "licensed",
          "start_ms": 1200,
          "end_ms": 3400,
          "start_seconds": 1.2,
          "end_seconds": 3.4,
          "placement": "partial_screen",
          "layout": "bottom",
          "getty_asset_family": "editorial",
          "source_metadata": {},
          "rights_metadata": {}
        }
      ],
      "completed_at": "2025-01-10T14:35:30Z",
      "original_node_id": "2ba7b810-9dad-11d1-80b4-00c04fd430c8"
    }
  ]
}

Output Fields ​

FieldTypeDescription
idstringUnique identifier for this output render
video_urlstringSigned URL to download the rendered video (valid for 7 days)
thumbnail_urlstring | nullSigned URL to download the video thumbnail
premiere_prproj_urlstring | nullSigned URL to download the Premiere Pro timeline zip attached to this render (when available)
sourcesarraySource citations for licensed or external media used in this output. Getty b-roll citations include timing, query, asset IDs when resolved, placement, and rights metadata.
completed_atstringISO 8601 timestamp when this output finished rendering
original_node_idstring | nullTemplate agent_node_id this output originated from. Use this to map outputs to specific nodes in your agent.

TIP

Tracking outputs: Use original_node_id to identify which node in your agent template produced each output. This allows you to consistently map outputs to your application logic across multiple runs.

Source Fields ​

FieldTypeDescription
providerstringSource provider, for example getty.
media_typestringimage, video, or another media type.
provider_asset_idstring | nullProvider asset ID, such as the Getty image/video ID, when resolved.
render_asset_idstring | nullInternal render/timeline asset ID.
querystring | nullSearch query used to choose the source.
start_ms / end_msnumber | nullUsage window in the rendered output.
placement / layoutstring | nullHow the media was placed, such as full_screen, partial_screen, top, or bottom.
source_metadata / rights_metadataobjectProvider-specific metadata and rights details when available.

Run Fields ​

FieldTypeDescription
agent_idstringAgent UUID that started this run.
statusstringOverall run status (see Status Values below).
status_messagestring | nullHuman-readable detail about the run status.
needs_creditsbooleantrue when one or more runtime tasks in this run are marked needs_credits=true (insufficient credits).
errorsarrayError messages grouped by template node. Each entry has original_node_id and messages[]. Empty array [] when the run has no errors.
node_status_countsobjectCounts of nodes in completed, in_progress, and failed states.

For node-level statuses, error details, and credit-blocked details, use Get Agent Run Nodes.

TIP

If needs_credits is true, first check GET /plan. If no paid plan is active, choose one via GET /plan/list and POST /plan/upgrade (complete checkout when requires_checkout: true). You can then enable auto top-ups with POST /credits/settings if your active plan is creator, creator_annual, professional, or professional_annual, and finally call Resume Agent Run to re-queue failed/blocked runtime nodes in the same run.

Status Values ​

StatusDescription
runningAgent is processing your videos
completedProcessing finished successfully
partial_completeSome outputs finished successfully, but others failed
failedThe entire run failed, no outputs generated
cancelledThe run was cancelled by the user