> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Task Status

> Track a batch upload task and retrieve the video IDs it produced.

<Info>
  **Product**: Visual Search
  **Use case**: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase
  **Host**: `https://api.memories.ai/serve/api/v1`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Track a **batch upload task** — the kind where one request expands into multiple videos — and retrieve the `video_no` of each video the task produced. This endpoint is for tasks that return a `taskId`, namely [Upload from Social Media](/visual-search/upload-from-post-urls). Once the task downloads each video, it queues each one for indexing; this endpoint reports the per-video parse status as it progresses.

<Warning>
  **This endpoint is not for single-file uploads.** [Upload Video](/visual-search/upload-video-from-file) and [Upload Image](/visual-search/upload-image-from-file) return a `videoNo` directly — there is no task to track. To poll the indexing status of a single video, call [Get Metadata](/visual-search/get-metadata) with the `video_no` instead, or register a `callback` URL at upload time.
</Warning>

## Prerequisites

* You have [created a memories.ai API key](/visual-search/create-your-key).
* You have a `taskId` from a previous call to [Upload from Social Media](/visual-search/upload-from-post-urls).

## Endpoint

GET /serve/api/v1/get\_video\_ids\_by\_task\_id

## Request Example

```python theme={null}
import requests

headers = {
    "Authorization": "sk-mavi-..."
}
params = {
    "task_id": "4b2d85ea-8b61-4689-96c3-75d907140242"
}
response = requests.get( 
    "https://api.memories.ai/serve/api/v1/get_video_ids_by_task_id", 
    headers=headers, 
    params=params
)
print("Status:", response.status_code)
print("Task Status Response:", response.json())
```

<Note>The request parameter is named **`task_id`** (snake\_case), but the upload response returns **`taskId`** (camelCase). They refer to the same value — pass the string through as-is.</Note>

## Request Parameters

<ParamField query="task_id" type="string" required>
  The `taskId` returned by [Upload from Social Media](/visual-search/upload-from-post-urls). Pass the string verbatim — the parameter name is snake\_case here even though the upload response field is camelCase.
</ParamField>

## Response Example

```json theme={null}
{
    "code": "0000",
    "msg": "success",
    "data": {
        "videos": [
            {
                "duration": "17",
                "status": "PARSE",
                "video_no": "VI624126275711397888",
                "video_name": "#football",
                "create_time": "1758262500019",
                "video_url": "https://mavi-resource.openinterx.com/VIabc123....mp4",
                "bucket": "mavi-resource",
                "blob": "VIabc123....mp4"
            },
            {
                "duration": "8",
                "status": "UNPARSE",
                "video_no": "VI624126275900141568",
                "video_name": "Salah",
                "create_time": "1758262500026",
                "video_url": "https://mavi-resource.openinterx.com/VIdef456....mp4",
                "bucket": "mavi-resource",
                "blob": "VIdef456....mp4"
            }
        ]
    },
    "failed": false,
    "success": true
}
```

<Warning>
  **Empty `data.videos` is ambiguous.** A successful response with `code: "0000"` and `data.videos: []` covers two cases that the server does not distinguish:

  1. The task is still downloading content from the source platform (videos haven't been queued yet).
  2. The `task_id` does not exist or does not belong to this account.

  Your polling loop should rely on a separate timeout to give up — there is no error code to detect "wrong task\_id".
</Warning>

## Response Fields

<ResponseField name="code" type="string">
  Business status code. `"0000"` indicates success. Note that an unknown `task_id` also returns `"0000"`.
</ResponseField>

<ResponseField name="msg" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data.videos" type="array">
  Per-video status entries produced by the task. Empty until the task has finished downloading each source post.
</ResponseField>

<ResponseField name="data.videos[].video_no" type="string">
  Unique identifier of the derived video. Use this in subsequent operations (search, get\_metadata, download, delete).
</ResponseField>

<ResponseField name="data.videos[].video_name" type="string">
  Best-effort name for the derived video — typically the source post's title, hashtag, or caption.
</ResponseField>

<ResponseField name="data.videos[].duration" type="string">
  Video duration in seconds, returned as a string.
</ResponseField>

<ResponseField name="data.videos[].create_time" type="string">
  Upload-into-library timestamp in milliseconds since epoch, returned as a string.
</ResponseField>

<ResponseField name="data.videos[].status" type="string">
  Processing status for this derived video. One of:

  * `PARSE` — Processing complete, video is searchable.
  * `UNPARSE` — Queued or being processed.
  * `FAIL` — Processing failed (e.g. source URL blocked, DRM-protected, or unsupported format). Common with media-channel YouTube content (NYT Cooking, Bon Appétit, etc.).
</ResponseField>

<ResponseField name="data.videos[].video_url" type="string">
  Hosted CDN URL of the stored video (on `mavi-resource.openinterx.com`). Suitable as a `file_uri` for [Gemini VLM](/visual-intelligence/gemini/gemini-vlm) once `status` is `PARSE`.
</ResponseField>

<ResponseField name="data.videos[].bucket" type="string">
  GCS bucket of the original video file. Omitted when the storage location cannot be resolved.
</ResponseField>

<ResponseField name="data.videos[].blob" type="string">
  GCS blob (object) path of the video file. Use it with `bucket` at `GET /serve/api/v2/download?bucket=&blob=` to fetch the file directly.
</ResponseField>


## OpenAPI

````yaml GET /serve/api/v1/get_video_ids_by_task_id
openapi: 3.1.0
info:
  title: Memories Platform API (Docs Mapping)
  version: v1
  description: OpenAPI mapping used by Mintlify Try it for the platform docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /serve/api/v1/get_video_ids_by_task_id:
    get:
      summary: Get Task Status
      operationId: get_task_status
      parameters:
        - name: task_id
          in: query
          required: true
          schema:
            type: string
          description: The task ID returned by an upload or scraping request.
      responses:
        '200':
          $ref: '#/components/responses/SuccessJson'
components:
  responses:
    SuccessJson:
      description: Successful response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericJsonResponse'
  schemas:
    GenericJsonResponse:
      type: object
      properties:
        code:
          type:
            - string
            - integer
          example: '0000'
        msg:
          type: string
          example: success
        data:
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items:
                type: object
                additionalProperties: true
            - type: string
            - type: 'null'
        success:
          type: boolean
          example: true
        failed:
          type: boolean
          example: false
      additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````