The AltTextLab API requires a publicly accessible image URL. Images stored in a private S3 bucket cannot be accessed directly — but you can grant temporary, scoped access using an S3 presigned URL. A presigned URL embeds your credentials and an expiry time into the URL itself. You generate it server-side, pass it to the API, and it becomes invalid once the signature expires — no permanent exposure, no bucket policy changes required.Documentation Index
Fetch the complete documentation index at: https://www.alttextlab.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
How it works
- Your server generates a presigned URL for the S3 object, valid for a short window (30–60 seconds is usually enough).
- You send the presigned URL to the AltTextLab API as
imageUrl. - The API fetches the image, generates alt text, and returns the result.
- The presigned URL expires automatically.
Step 1: Generate a presigned URL
Use the AWS SDK for your language to sign aGetObject request. Set the expiry short enough that the URL cannot be reused — 60 seconds works for most cases.
Your AWS credentials need
s3:GetObject permission on the bucket or key. The credentials used to sign the URL are never exposed — only the signature is embedded in the URL.Step 2: Pass the presigned URL to the API
Use the signed URL asimageUrl in your generation request. Everything else works the same as with a public URL.