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

# Récupérer une ressource de personnage

> Récupérer une ressource de personnage by ID and read its processing status before using it in a Seedance request.

Récupérez une ressource du compte authentifié. Envoyez le jeton d’accès brut dans l’en-tête `Authorization`, sans préfixe `Bearer`.

```bash theme={null}
curl \
  https://api.cometapi.com/api/asset/assets/<ASSET_ID> \
  -H "Authorization: $COMETAPI_ACCESS_TOKEN"
```

| Champ | Description |
| - | - |
| `data.id` | Asset ID used in `asset://<ASSET_ID>`. |
| `data.group_id` | Groupe propriétaire de la ressource. |
| `data.asset_type` | `image`, `video`, or `audio`. |
| `data.status` | `processing`, `active`, or `failed`. |
| `data.fail_reason` | Motif nettoyé lorsque le traitement échoue. |

Utilisez la ressource dans [Créer une vidéo Seedance](https://apidoc.cometapi.com/fr/api/video/seedance/create.md) uniquement après `data.status=active`. Une ressource inconnue, échouée ou en traitement provoque une erreur de requête vidéo.


## OpenAPI

````yaml api/openapi/video/seedance/get-character-asset.openapi.json GET /api/asset/assets/{id}
openapi: 3.1.0
info:
  title: Retrieve character asset API
  version: 1.0.0
  description: Retrieve a CometAPI character asset by ID and read its processing status.
servers:
  - url: https://api.cometapi.com
security:
  - accessTokenAuth: []
paths:
  /api/asset/assets/{id}:
    get:
      summary: Retrieve a character asset
      description: >-
        Read an asset that belongs to the authenticated account. Wait until
        status is active before using asset://<ASSET_ID> in a Seedance request.
      operationId: seedance_get_character_asset
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: CometAPI asset ID.
          example: as-example
      responses:
        '200':
          description: Character asset returned.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - message
                  - data
                properties:
                  success:
                    type: boolean
                    description: Whether the request succeeded.
                  message:
                    type: string
                    description: Status or error message.
                  data:
                    $ref: '#/components/schemas/AssetView'
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    message: ''
                    data: {}
        '401':
          description: The access token is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: unauthorized
        '404':
          description: The asset does not exist for the authenticated account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: asset not found
      x-codeSamples:
        - lang: Shell
          label: Character asset request
          source: |-
            curl \
              https://api.cometapi.com/api/asset/assets/<ASSET_ID> \
              -H "Authorization: $COMETAPI_ACCESS_TOKEN"
        - lang: Python
          label: Character asset request
          source: |
            import os
            import requests

            response = requests.get(
                "https://api.cometapi.com/api/asset/assets/<ASSET_ID>",
                headers={"Authorization": os.environ["COMETAPI_ACCESS_TOKEN"]},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: Character asset request
          source: |
            const response = await fetch(
              "https://api.cometapi.com/api/asset/assets/<ASSET_ID>",
              { headers: { Authorization: process.env.COMETAPI_ACCESS_TOKEN } },
            );

            if (!response.ok) throw new Error(await response.text());
            console.log(await response.json());
components:
  schemas:
    AssetView:
      type: object
      required:
        - id
        - group_id
        - asset_type
        - status
        - created_at
      properties:
        id:
          type: string
          description: CometAPI asset ID.
          example: as-example
        group_id:
          type: string
          description: Owning group ID.
          example: ag-example
        name:
          type: string
          description: Optional asset name.
        asset_type:
          type: string
          enum:
            - image
            - video
            - audio
          description: Asset media type.
        status:
          type: string
          enum:
            - processing
            - active
            - failed
          description: Asset processing status.
        fail_reason:
          type: string
          description: Sanitized failure reason when processing fails.
        created_at:
          type: integer
          description: Creation time as a Unix timestamp in seconds.
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Description of the request error.
        data:
          type:
            - object
            - array
            - 'null'
          description: Error details when returned.
      additionalProperties: true
  securitySchemes:
    accessTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Raw CometAPI access token. Do not prefix it with Bearer.

````

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