---
title: "Initialize a image reference upload"
method: POST
path: "/actions/images_upload_initialize"
tags: ["images"]
---

# Initialize a image reference upload

`POST /actions/images_upload_initialize`

## Request

- Base URL: `https://api.voicecheap.ai/v1`
- URL: `https://api.voicecheap.ai/v1/actions/images_upload_initialize`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Prepare a JPG, PNG or WebP reference upload up to 8 MiB. Use images_upload_sign_parts to get PUT URLs, upload the bytes, then call images_upload_complete and use its fileKey when generating.

## Headers

- `Idempotency-Key` string, uuid

## Request body

- object
  - `requestId` string, uuid: UUID v4 for this action. Reuse the same ID with identical arguments on retries.
  - `filename` string, required: The image filename, with an extension matching contentType.
  - `contentType` 'image/jpeg' | 'image/png' | 'image/webp', required
  - `fileSize` integer, required: Exact file size in bytes, up to 8 MiB.

## Response `200`

Completed result or saved request state.

- object
  - `data` unknown, required
  - `requestId` string, uuid

## Other responses

- `202`: The action is running. Poll action_request_get with requestId and operation.
- `400`: Invalid arguments.
- `401`: Invalid or expired API key.
- `403`: Permission or subscription required.
- `409`: Idempotency conflict or account concurrency limit.
- `429`: Shared account rate or monthly limit reached.

---

[API](https://skmtc.dev/voicecheap/apis/voicecheap-api.md) · [All operations](https://skmtc.dev/voicecheap/apis/voicecheap-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voicecheap/apis/voicecheap-api/revisions/0cb50268f31a?raw)
