ImageDescriberAI

API Documentation

Complete guide to integrate ImageDescriberAI into your applications

Getting Started

To use the ImageDescriberAI API, you need to be authenticated. All API requests require token-based authentication.

Base URL: https://imagedescriberai.com/api/

Authentication

All API endpoints require authentication via API Key. You must create an API key from your API Keys page to use the API.

How to Authenticate

Include your API key in the request headers using one of these methods:

Method 1: Authorization Header (Recommended)

Authorization: Bearer sk_live_XXXXXXXXXX

Method 2: X-API-Key Header

X-API-Key: sk_live_XXXXXXXXXX

⚠️ Important: Keep your API keys secure! Never share them publicly or commit them to version control. Use environment variables in your applications.

POST /api/describe/

Generate AI-powered descriptions for images using various templates.

Request Parameters

file REQUIRED

Image file to describe

  • Type: Image file (multipart/form-data)
  • Formats: JPG, JPEG, PNG, WEBP, GIF
  • Max size: 5MB
prompt REQUIRED

Description template to use

Type: String (one of the following):

  • • "AI Describe Image In Detail"
  • • "AI Describe Image Briefly"
  • • "AI Describe The Person In The Image"
  • • "Extract Text From Image"
  • • "AI Describe Image For Caption Or Title"
  • • "Image To Midjourney Prompt"
  • • "Image To Stable Diffusion Prompt"
  • • "Generate Marketing Copy"
  • • "Object Recognition"
lang OPTIONAL

Language for the description (default: "English")

Type: String (one of the following):

  • • "English" (default)
  • • "Spanish"
  • • "French"
  • • "German"
  • • "Italian"
  • • "Portuguese"
  • • "Turkish"
  • • "Chinese"
  • • "Japanese"
  • • "Korean"
json_response OPTIONAL

Request AI to return response in JSON format (default: false)

Type: Boolean (one of the following):

  • • false (default)
  • • true

Example Request

curl -X POST https://imagedescriberai.com/api/describe/ \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY_HERE" \
  -F "file=@/path/to/image.jpg" \
  -F "prompt=AI Describe Image In Detail" \
  -F "lang=English" \
  -F "json_response=true"

Response Examples

Success (200 OK)

Standard text response (json_response=false):

{
  "status": "success",
  "message": "Image description generated successfully",
  "content": "A beautiful sunset over the ocean with vibrant orange and pink hues...",
  "credits_remaining": 149
}

JSON formatted response (json_response=true):

{
  "status": "success",
  "message": "Image description generated successfully",
  "content": "{ \"scene\": \"sunset\", \"colors\": [\"orange\", \"pink\"], \"location\": \"ocean\", \"mood\": \"serene\" }",
  "credits_remaining": 149
}

Authentication Failed (401 Unauthorized)

{
  "status": "error",
  "message": "Authentication required. Please provide a valid API key."
}

Invalid Request (400 Bad Request)

{
  "status": "error",
  "message": "Invalid request data",
  "errors": {
    "file": ["This field is required."],
    "prompt": ["Invalid choice. Must be one of the available templates."]
  }
}

Insufficient Credits (402 Payment Required)

{
  "status": "error",
  "message": "Insufficient credits. Please purchase more credits to continue."
}

Server Error (500 Internal Server Error)

{
  "status": "error",
  "message": "Failed to process image. Please try again later."
}

Credits & Costs

Each API request consumes 1 credit from your account.

  • Credits are deducted after successful image processing
  • Failed requests do not consume credits
  • Purchase credits from the pricing page
  • Check your remaining credits in the API response or dashboard

Need Help?

If you have questions or need assistance with the API, feel free to reach out.

Contact Support