## Retry a signed asset upload

`client.assets.retry(stringassetID, RequestOptionsoptions?): AssetRetryResponse`

**post** `/assets/{assetId}/retry`

Creates a fresh signed upload reservation for a failed or expired asset upload. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

### Parameters

- `assetID: string`

  Asset identifier

### Returns

- `AssetRetryResponse`

  - `asset_id: string`

    Asset identifier

  - `status: "pending_upload" | "ready" | "failed"`

    - `"pending_upload"`

    - `"ready"`

    - `"failed"`

  - `url: string | null`

    Asset URL

  - `visibility: "workspace"`

    - `"workspace"`

  - `workspace_id: string | null`

    Workspace identifier

  - `expires_at?: string`

    Expiration time for the upload URL

  - `failure_message?: string | null`

    Failure message when the asset is in failed status

  - `upload?: Upload`

    - `content_type: "multipart/form-data"`

      - `"multipart/form-data"`

    - `file_field: "file"`

      - `"file"`

    - `form_fields: Record<string, string>`

      Upload form fields

    - `method: "POST"`

      - `"POST"`

    - `url: string`

      Upload URL

  - `upload_url?: string`

    Upload URL (serialized)

### Example

```typescript
import FLORA from '@flora-ai/flora';

const client = new FLORA({
  apiKey: process.env['FLORA_API_KEY'], // This is the default and can be omitted
});

const response = await client.assets.retry('asset_abc123');

console.log(response.asset_id);
```

#### Response

```json
{
  "asset_id": "asset_abc123",
  "status": "pending_upload",
  "url": "https://example.com",
  "visibility": "workspace",
  "workspace_id": "ws_abc123",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "failure_message": "failure_message",
  "upload": {
    "content_type": "multipart/form-data",
    "file_field": "file",
    "form_fields": {
      "foo": "string"
    },
    "method": "POST",
    "url": "https://example.com"
  },
  "upload_url": "https://upload.imagekit.io/api/v1/files/upload"
}
```
