> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akool.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Analysis Result

> Get Analysis Result for Head Swap V5.

```
GET https://openapi.akool.com/api/open/v5/headswap/analyze/detail?_id={{analysis_id}}
```

**Query Attributes**

| **Parameter** | **Type** | **Required** | **Description** |
| - | - | - | - |
| \_id | String | true | Analysis ID returned by the analyze endpoint. |

```bash cURL theme={null}
curl --location 'https://openapi.akool.com/api/open/v5/headswap/analyze/detail?_id=670000000000000000000001' \
--header 'x-api-key: {{API Key}}'
```

**Response Attributes**

| **Parameter** | **Type** | **Description** |
| - | - | - |
| data | Object | Analysis record. |
| - \_id | String | Analysis ID. |
| - task\_id | String | Downstream algorithm/provider task ID; may be empty until submission. Use `_id`, not this value, for task-detail queries. It may change between workflow stages. |
| - status | Integer | 1 = queueing, 2 = processing, 3 = completed, 4 = failed. |
| - url | String | Original source URL. |
| - media\_type | String | Original media type. |
| - progress | Number | Progress when available. |
| - analysis\_result | Object | Algorithm result, available after completion. |
| -- track\_manifest\_url | String | Tracking manifest required to create the replacement task. |
| -- media | Array | Detected objects. |
| --- obj\_id | Integer | Detected person/object ID for mappings. |
| - error\_reason | String | Failure reason when available. |

Use your API key. Wait for `data.status: 3`, then read person IDs from `data.analysis_result.media[].obj_id`. The completed result must also contain `track_manifest_url`. Pass that analysis ID as `analyze_id` and the detected IDs as `mappings[].obj_id` when creating a task. Failed analysis uses `status: 4`; inspect its failure reason before retrying.

<Note>For input limits, billing, callbacks, and error codes, see the [Head Swap V5 overview](/ai-tools-suite/swap-studio/head-swap-v5).</Note>


## OpenAPI

````yaml GET /api/open/v5/headswap/analyze/detail
openapi: 3.0.3
info:
  title: Swap Studio V5 API
  version: 5.0.0
  description: Asynchronous character, motion, head, hair and clothing replacement APIs.
servers:
  - url: https://openapi.akool.com
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/open/v5/headswap/analyze/detail:
    get:
      tags:
        - Head Swap
      summary: Get Analysis Result — Head Swap
      description: >-
        See the Head Swap V5 reference for model-specific constraints and
        conditional parameters. Authorization takes precedence when both
        authentication headers are supplied.
      operationId: headswap_analysis_result
      parameters:
        - name: _id
          in: query
          required: true
          description: >-
            Analysis data._id returned by analyze; the record must belong to
            your user/team.
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
          example: '670000000000000000000001'
      responses:
        '200':
          description: >-
            Business response. Code 1000 means the request succeeded; inspect
            task status or data.errors for generation/submission outcomes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 1000
                  msg:
                    type: string
                    example: OK
                  data:
                    type: object
                    properties:
                      _id:
                        type: string
                      status:
                        type: integer
                        enum:
                          - 1
                          - 2
                          - 3
                          - 4
                      url:
                        type: string
                      media_type:
                        type: string
                      progress:
                        type: number
                      analysis_result:
                        type: object
                        properties:
                          track_manifest_url:
                            type: string
                          media:
                            type: array
                            items:
                              type: object
                              properties:
                                obj_id:
                                  type: integer
                              additionalProperties: true
                        additionalProperties: true
                      error_reason:
                        type: string
                      task_id:
                        type: string
                        description: >-
                          Downstream algorithm/provider task ID; may be empty
                          until submission. Use `_id`, not this value, for
                          task-detail queries. It may change between workflow
                          stages.
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl --request GET \

            --url
            'https://openapi.akool.com/api/open/v5/headswap/analyze/detail?_id=670000000000000000000001'
            \

            --header 'x-api-key: <api-key>'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.