PicWordify API Documentation

Generate AI-powered alt text for images programmatically using our RESTful API. Perfect for adding image accessibility features to your applications.

Authentication

All API requests require an API key passed in the request headers. You can obtain your API key from your dashboard.

'x-api-key: YOUR_API_KEY'

Endpoint

POSThttps://www.picwordify.com/api/v1/alt

Request Body

Required (one of the following):

  • base64Image: Base64 encoded image string see more https://www.base64-image.de/
  • imageUrl: Public URL of the image

Optional:

  • fileName: Custom name for the image (default: "image.jpg")
  • language: Language code for the alt text (default: "en")
  • tone: Tone of the alt text (default: "NEUTRAL")
  • keywords: Comma-separated keywords to influence the description

Response

{
  "alt": "A detailed description of the image",
  "duration": 1234,
  "cached": false
}

alt: The generated alt text description

duration: Processing time in milliseconds

cached: Whether the result was served from cache

Error Codes

401 - API key required

403 - Invalid or inactive API key / Active subscription required / Insufficient credits

400 - Invalid request (missing or invalid parameters)

405 - Method not allowed

Code Example

const response = await fetch('https://www.picwordify.com/api/v1/alt', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    // Either provide base64Image or imageUrl, not both
    imageUrl: 'https://example.com/image.jpg',
    // Optional parameters
    fileName: 'custom-name.jpg',  // Default: 'image.jpg'
    language: 'en',               // Default: 'en'
    tone: 'NEUTRAL',             // Default: 'NEUTRAL'
    keywords: 'fashion, dress'    // Default: null
  })
});

const data = await response.json();
console.log(data.alt);

Rate Limits

Rate limits are based on your subscription plan and available credits. Each API call consumes 1 credit. Please ensure you have an active subscription and sufficient credits before making API calls.