API Reference

Complete reference for the img2voice API • Base URL: https://api.img2voice.com • Version: v1

Overview

The img2voice API converts images to speech. Submit an image (public URL, multipart upload, or base64), the API uses vision to describe it, then generates speech in 60+ languages. The response includes the AI description and a signed audio URL (valid for 24 hours). No SDKs required — plain HTTPS JSON or multipart.

Authenticate with the IMG2VOICE-API-KEY header. Create a key in your dashboard. Requests may take up to 120 seconds (vision + TTS).

Authentication

All API requests must include your API key in the IMG2VOICE-API-KEY header. Production keys are prefixed with sk_live_.

Never expose your API key in client-side code. Call the API from your server.
http - request header
IMG2VOICE-API-KEY: sk_live_your_api_key_here

Convert image

POSThttps://api.img2voice.com/v1

Submit one image and optional voice/language settings. Provide exactly one image source: multipart field image, image_url, or image_base64. Max upload size: 10 MB. Supported MIME types: JPEG, PNG, WebP, BMP, TIFF.

Costs 1 image credit per successful request. WAV output requires a paid plan (not free).

Parameters

JSON body fields (also accepted as multipart form fields when uploading a file):

ParameterTypeRequiredDescription
image_urlstringYes*Public HTTP/HTTPS URL of the image. Private/loopback addresses are rejected. *One of image_url, image_base64, or multipart field image is required.
image_base64stringYes*Raw base64 image data (no data-URI prefix). Formats: JPEG, PNG, WebP, BMP, TIFF.
image_mime_typestringNoMIME type when using image_base64. One of image/jpeg, image/png, image/webp, image/bmp, image/tiff. Default: image/jpeg.
imagefileYes*Multipart form field name for file upload. Max 10 MB.
voice_idstringNoVoice: eve, ara, rex, sal, or leo. Default: eve.
languagestringNoBCP-47 code (e.g. "en", "es", "ja") or "auto". Default: auto.
detailstringNo"brief", "standard", or "detailed". Default: standard.
output_formatstringNo"mp3" or "wav". Default: mp3. WAV requires a paid plan.

Response fields

FieldTypeDescription
idstringUnique request ID (prefix img_).
statusstring"completed" on success.
descriptionstringAI-generated description (translated when language is set).
audio_urlstringSigned URL to the audio file, valid for 24 hours.
duration_secondsnumberEstimated audio length in seconds.
image_credits_usedintegerCredits consumed (always 1 for this endpoint).
image_credits_remainingintegerCredits left after this request.
voice_idstringVoice used.
created_atstringISO 8601 timestamp.
source_languagestringPresent only when translation occurred.
translatedbooleantrue when the description was translated.

Code examples

Ready-to-copy examples for each image input method. Each block has a copy button.

URL input

bash
curl -X POST https://api.img2voice.com/v1 \
  -H "IMG2VOICE-API-KEY: sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/photo.png",
    "voice_id": "eve",
    "language": "en",
    "detail": "standard",
    "output_format": "mp3"
  }'

Multipart file upload

bash
curl -X POST https://api.img2voice.com/v1 \
  -H "IMG2VOICE-API-KEY: sk_live_your_api_key_here" \
  -F "image=@./photo.png" \
  -F "voice_id=eve" \
  -F "language=en" \
  -F "detail=standard" \
  -F "output_format=mp3"

Base64 JSON

bash
curl -X POST https://api.img2voice.com/v1 \
  -H "IMG2VOICE-API-KEY: sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "image_base64": "'"$(base64 < photo.png | tr -d '\n')"'",
    "image_mime_type": "image/jpeg",
    "voice_id": "eve",
    "language": "auto",
    "output_format": "mp3"
  }'

Batch

POSThttps://api.img2voice.com/v1/batch

Process multiple images in one request. Requires a paid plan (plan_required otherwise). Max batch size is 20 items. Each item must include a public image_url (URL input only — no multipart/base64 in batch). Credits are reserved upfront; failed items are refunded.

FieldTypeDescription
requestsarrayNon-empty array of items. Each item supports image_url (required), voice_id, language, output_format, detail.
resultsarrayPer-item result. Completed items match the single-convert response (without credit fields). Failed items include status "failed" and an error object.
totalintegerNumber of items in the batch.
bash
curl -X POST https://api.img2voice.com/v1/batch \
  -H "IMG2VOICE-API-KEY: sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {"image_url": "https://example.com/a.png", "voice_id": "eve"},
      {"image_url": "https://example.com/b.png", "voice_id": "ara", "language": "es"}
    ]
  }'

Account

GEThttps://api.img2voice.com/v1/account

Returns the authenticated key's plan, credit balance, rate limit (rpm), and batch size.

json - response
{
  "email": "you@example.com",
  "plan": "paid",
  "key": "sk_live_…",
  "image_balance": 180,
  "images_used": 20,
  "rpm": 200,
  "batch_size": 20
}
bash
curl https://api.img2voice.com/v1/account \
  -H "IMG2VOICE-API-KEY: sk_live_your_api_key_here"

Rate limits

Limits are per API key. When exceeded, the API returns HTTP 429 with a Retry-After header and retry_after in the JSON body (seconds).

PlanReq / minConcurrentBatch size
Demo510 (not available)
Free1010 (not available)
Starter200100 (not available)
Paid2001020

Signup grants 25 free image credits. The anonymous homepage demo allows 3 images per IP per day.

Error codes

Errors return JSON with an error object containing code and message. Rate-limit errors also include retry_after.

json - error response
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded (200 req/min on paid plan). Retry after 18s.",
    "retry_after": 18
  }
}
CodeHTTPDescription
invalid_api_key401API key missing, invalid, or revoked.
invalid_request400Missing image, bad URL/base64, unsupported MIME type, invalid output_format/detail, upload error, or batch validation failure.
invalid_voice400voice_id not one of: eve, ara, rex, sal, leo.
invalid_language400language is not a supported BCP-47 code or "auto".
text_too_long400Generated text exceeds TTS limits.
rate_limit_exceeded429Requests-per-minute exceeded. Use Retry-After / retry_after.
demo_limit_reached429Anonymous demo daily limit (3 images/IP) reached.
quota_exceeded402No image credits remaining (or not enough for a batch).
plan_required403Feature needs a paid plan (batch, WAV output, CSV export).
not_found404Unknown route.
server_error500Vision, TTS, storage, or unexpected failure. Retry; contact support if it persists.