Get started with the Alt Magic API for generating AI-powered alt text
POST
request to generate alt text for any image. You can configure parameters in the API request body or provide additional context for better results. The API automatically falls back from Gemini to OpenAI if needed, ensuring maximum reliability.
image_url
- Publicly accessible URL of the imageuser_id
- Your unique identifier (email address)blog_title
- Context for better alt text generationseo_keywords
- Keywords for SEO optimizationlanguage_code
- Language for the generated text (All supported languages →).language_code
parameter in your requests.
Popular Languages:
en
) - Default language (fallback)es
) - Españolfr
) - Françaisde
) - Deutschzh-CN
, zh-TW
) - 中文ja
) - 日本語ko
) - 한국어ar
) - العربيةhi
) - हिन्दीpt
, pt-BR
) - Portuguêshttps://api.altmagic.pro
Alt Text Generation: POST /v1/generate-alt-text-api
- Generate AI-powered alt text for images with automatic fallback from Gemini to OpenAI.
User Details: POST /v1/get-user-details-api
- Retrieve user account information including subscription plan and available credits.
x-api-key
header. This key can be generated and managed from your Alt Magic dashboard. Keep your API key confidential and never expose it in client-side code or public repositories.
API Key: Include the x-api-key
header in your request for authentication (recommended for server-to-server integrations).
Status Code | Meaning | Description |
---|---|---|
200 | Success | Request was successful |
400 | Bad Request | Validation errors in the request |
401 | Unauthorized | Authentication required |
403 | Forbidden | Insufficient credits |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | An error occurred on the server |