If you're building more than one or two pages, picking images by hand stops being the bottleneck you notice and becomes the one that quietly slows everything down. Search, download, rename, compress, upload, write alt text, repeat. An image API moves that whole loop into code, so a page can ask for the right image for a specific slot and get back a usable, properly licensed result without a person in the middle.
This overview explains what an image API does and how to organize an adapter around the page section an image serves. Requests and responses are illustrative designs, rather than a live Picdrome service contract. The deeper how-tos (search, builders, caching, packs, license compliance) get their own posts, linked at the bottom.
Scope. This is a vendor-neutral integration-design guide, not documentation for a live Picdrome API. The requests and responses below are pseudocode for an adapter you control. Use Picdrome's human-facing library for Picdrome images and read the developer hub for the maintained design model.
What an image API actually does
A web API is just a URL your code can call to get structured data back, usually as JSON. An image API is one whose data describes images: where to find each file, what it shows, how it's tagged, and what you're allowed to do with it.
The practical difference from downloading is automation. When you grab an image by hand, you are the integration: you decide it fits, you save it, you write the alt text, you check the license. An API lets a program do those steps. You'd reach for one when:
- You're filling many pages, sites, or generated templates and can't click through each one.
- An AI website builder or agent assembles pages from a brief and needs an image per section, on demand.
- A CMS fills section slots automatically and wants alt text and license data to arrive with the image.
- You want licensing and metadata to travel with the image, so nothing has to be reconciled later.
If you only need a handful of images for one project, the human-facing free image library is faster. The API earns its place when the same task repeats at scale.
How to organize image records around a page slot
Most stock APIs answer keyword searches: type "office," get a pile of office photos, then squint at each one. That works for browsing. It's awkward for a program that needs the hero image for a cafe homepage and nothing else.
An image-source adapter can describe images along three facets that match a page-building request:
- Where it goes (page section) — homepage hero, about section, blog header, feature block. This is the slot you're filling.
- Who it's for (business type) — cafe, law firm, fitness studio, SaaS. This narrows tone and subject.
- What style it is (visual style) — minimal, warm, bold, muted, overlay-friendly.
Because those facets are structured rather than buried in a caption, a request can name them directly instead of guessing keywords. You're asking "give me an image for this slot, for this kind of business, in this style," which is much closer to the decision a builder actually makes. The dedicated guide on how to search images by business type and page section through the API goes deeper on querying.
A first request: search by page section and business type
Here is pseudocode for the request shape your own image-source adapter might expose. It is not a Picdrome endpoint.
GET /api/images/search?suggested_use_case=homepage-hero&business_type=cafe&style=warm
The adapter is being asked for images suited to a homepage hero, for a cafe, in a warm style. Its response should normalize matches into a stable internal record.
The query is a design example. Define and version your own contract, map it to an image source you are authorized to use, and test it before production. The fields below illustrate the metadata a robust internal record should preserve.
Reading the response
A single image in the response looks roughly like this. The field names follow the developer hub reference:
{
"name": "Warm corner cafe counter",
"slug": "warm-corner-cafe-counter",
"category": "cafes",
"tags": ["coffee", "counter", "warm", "overlay-friendly"],
"alt_text": "Sunlit cafe counter with a barista station and pastries",
"suggested_use_cases": ["homepage-hero", "about-section"],
"related_images": ["minimal-espresso-bar", "cozy-window-seat"],
"license": {
"summary": "Read the current source license before publishing.",
"attribution_required": null,
"ai_generated": true,
"terms_url": "/license/"
}
}
What each part gives you:
name/slug— a readable title and the stable identifier you use to fetch or reference the image later.categoryandtags— the subject grouping and descriptive keywords for filtering and matching.alt_text— descriptive alt text you can drop straight into your markup. No need to write it yourself.suggested_use_cases— where the image fits, such ashomepage-heroorabout-section. This is the "where it goes" facet in the response.related_images— slugs of images in a similar style, useful for fallbacks or sets.license— a machine-readable object describing the terms.
A few fields the brief and some builders ask about are not on the live response yet:
| Potential field | Current guidance | What it would carry |
|---|---|---|
image_url | Do not assume this field exists; resolve the current asset through its documented slug or file reference. | Direct URL to the full-size image file |
thumbnail_url | Generate responsive renditions in your own image pipeline unless current documentation adds one. | Smaller preview URL for listings |
what / when / who context fields | Use documented category, tags, and suggested_use_cases values instead. | Explicit style / occasion / business-type values as separate fields |
Keep placement facets in documented category, tags, and suggested_use_cases fields rather than inventing undocumented keys. The guide on what image metadata matters when building pages programmatically explains how to normalize source-specific data. Your adapter should resolve an asset through fields it has validated rather than assuming a URL or slug exists.
The license field, and what it does and doesn't grant
Your normalized image record should include a license object that points to the source's current terms. Delivery through code never grants broader rights than the source license.
Do not hard-code a permission or attribution answer. Resolve attribution_required from the current source license; leave it null and block publishing when the rule is unclear. For Picdrome images, terms_url should link to the canonical Picdrome Image License. This is general information, not legal advice. The guide on how to keep image-license data attached in an integration covers passing terms through to users.
Honest about generated imagery
Picdrome images are AI-generated, and the response says so with ai_generated: true. That flag is a disclosure, not a footnote. When you show one of these images to an end user, describe it accurately. An image of a person is not a real, identifiable individual and is not a customer, team member, or endorser of any product. Don't present it as one.
Placing the returned image on a page
Once you have an image object, placement is mechanical:
- Resolve the file through the documented
slugorimage_filevalue; do not assume a directimage_urlfield. - Insert it into the section markup with the supplied
alt_text— accessible alt text, already written, is one of the main reasons to pull from the API rather than scrape. - Resolve
license.attribution_requiredfrom the current terms: render the required credit whentrue, retain evidence whenfalse, and block publishing when the value is unknown. - Size and compress for the slot. A hero needs different dimensions and weight than a blog thumbnail; serve a sized, modern format (such as WebP) so the page stays fast and the image reads cleanly behind any overlay text.
A good placed image fits its section, stays readable behind headlines and buttons, loads quickly, and matches the brand's tone. That's the bar — not any claim about what an image does to a visitor's behavior.
If you're assembling the page in a website builder, inserting a fetched image into the section you're working on is the same step whether you found it by hand or through code; tools like Cedros are one place that insertion happens. The mechanics of caching responses, batching, and rate limits get their own treatment in image API best practices.
When an API beats manual sourcing (and when it doesn't)
The honest answer is: it depends on volume and repetition. Use this to self-select.
| Situation | Better fit |
|---|---|
| One landing page, a few images, picked with care | Manual sourcing from the free library |
| A curated set for a known project or niche | A ready image pack |
| Many pages, sites, or generated templates filled on demand | Image API |
| A builder or agent assembling pages from a brief | Image API |
| You want alt text and license data to arrive with each image, automatically | Image API |
Manual sourcing wins when judgment matters more than throughput and the count is small. Packs win when someone has already curated the right set for your case — the choice between an image API and image packs is worth its own read. The API wins when the task repeats and a human picking each image would be the bottleneck.
The trade is control versus scale. By hand you eyeball every choice but can't keep up across many pages. The API keeps up but asks you to express your intent as a query and trust the structured match. Most teams use both: the API for the bulk, a human pass for the pages that carry the most weight.
Where to go next
This post frames the topic; these go deeper on each piece:
- How AI website builders can pull in ready-to-use images — how a builder or agent requests an image per section and places it automatically.
- What image metadata matters when building pages programmatically — which structured fields earn their keep, and why.
- How to search images by business type and page section via API — querying by the three facets instead of keyword soup.
- Image API or image packs? How to decide what your project needs — the trade-off, with a practical decision guide.
- Staying license-compliant when you pull images through an API — reading the license object and passing terms to users.
- Image API best practices: caching, rate limits, and performance — polite request patterns and keeping pages fast.
In Plain English
An image API is a URL your code calls to obtain structured image data instead of downloading each asset by hand. This article uses Picdrome's page-section, business-type, and style taxonomy to demonstrate a vendor-neutral internal record; it does not document a live Picdrome service. Use this model when the work repeats at scale, and use the human library or a pack when you need only a few hand-picked images. Preserve alt text, AI-generated provenance, the source, and the current license with every asset. Never present a generated person as real, and never publish while the rights or attribution rule is unknown. Start with the maintained integration design guide. This is general information, not legal advice.