canonical: https://jentic.com/apis/contentful.com/contentful

# Contentful Images API

Jentic publishes the only available OpenAPI specification for Contentful Images API, keeping it validated and agent-ready. The Contentful Images API serves and transforms images stored in Contentful spaces directly from the CDN, applying resize, crop, format conversion, quality adjustment, and smart focus crops through URL query parameters. Requests resolve to a signed asset URL keyed by space id, asset id, and token, with no separate API token required because access is gated by the asset's own signed URL.

## For AI agents

Resize, crop, and reformat images stored in Contentful via signed CDN URLs. Supports format conversion (WebP, AVIF, JPEG, PNG), quality controls, and focal-point cropping.

## Scope

Does not handle content modelling, entry CRUD, or asset upload - use for transforming existing Contentful image assets via the CDN only.

## Capabilities

- Resize Contentful-hosted images to a target width and height through URL parameters
- Convert between JPEG, PNG, WebP, AVIF, and GIF formats on-the-fly
- Apply smart focal-point cropping using face or feature detection
- Adjust image quality and progressive loading for different network conditions
- Pad, fit, fill, scale, thumb, and crop with explicit fit modes
- Serve transformed assets from regional CDNs in the global or EU region

## Use cases

### Responsive Image Delivery

Front-end teams use the Contentful Images API to generate responsive variants of a single source asset, picking width, format, and quality at request time rather than uploading multiple renditions. The CDN handles the transformation and caches the result, so build pipelines do not need to pre-render every breakpoint. Integration is a few minutes because the transformation is just URL parameters appended to the existing asset URL.

Example prompt: Build a srcset for a Contentful asset with widths 400, 800, and 1600, format=webp, and quality=75

### Format Modernisation Without Re-upload

Teams migrating to AVIF or WebP can convert legacy JPEG or PNG assets in Contentful by appending fm=avif or fm=webp to existing URLs, with optional quality (q) and fit parameters. No re-upload or workflow change is needed in the headless CMS, and old URLs continue to work for clients that do not request the new format. This avoids a bulk asset migration project.

Example prompt: Generate the URL to fetch a Contentful asset as AVIF at quality 70 and fit=thumb with face-aware focus area

### Programmatic Thumbnail Generation

Editorial and e-commerce platforms generate consistent thumbnails for content lists by requesting fixed dimensions with smart focus cropping. The fit=thumb and f=face parameters keep faces or product features centred without manual crop work. Because the CDN caches the transformed result, repeated requests for the same variant are served instantly.

Example prompt: Request a 300x300 thumbnail of a Contentful product image with fit=thumb and f=face for a category page tile

### AI Agent Asset Optimisation via Jentic

An AI agent embedded in a content workflow uses Jentic to discover the Contentful Images URL grammar and produce optimised variants when given a source asset. The agent reads the operation schema, builds the URL with the right query parameters, and returns the transformed URL to downstream tooling. No credentials are required because Contentful asset URLs already include their own signing token.

Example prompt: Search Jentic for 'transform a contentful image', load the schema, and return a URL that serves the asset at 1200px wide as WebP with quality 80

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /{space_id}/{asset_id}/{token}/{filename} | Retrieve and transform a Contentful image asset using URL query parameters |

## Key resources

- **Image asset** — A Contentful-hosted image referenced by space id, asset id, signed token, and filename
- **Transformation parameters** — Query parameters w, h, fit, f, fm, q, r, bg and others applied at request time
- **Regional CDN endpoints** — Global (images.ctfassets.net) and EU (images.eu.ctfassets.net) image delivery endpoints

## Why Jentic

- **Setup:** Wiring the Contentful Images API by hand means learning its space, asset, token, and filename URL grammar and its transform query parameters yourself. Through Jentic you install once, import the Contentful Images API from the API Directory, and your agent calls it, with the per-asset signed token supplied as a path parameter rather than a stored credential.
- **Permission scoping:** The Contentful Images API exposes a single read transform over image assets, so the agent is limited to that one operation and can do nothing else. Because it only transforms and reads existing assets, there is nothing for the agent to modify or delete.
- **Credential handling:** The Contentful Images API needs no stored token, since the per-asset signed token travels as a path parameter, and Jentic One still records each call in its audit trail. No secret enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'transform a Contentful image', and Jentic returns the single transform operation with its query-parameter schema so the agent calls it correctly without memorising the Contentful Images URL grammar.

## Related APIs

- **Cloudinary Upload API** — Cloudinary stores and transforms images independently of a CMS, with a richer transformation grammar.
- **Cloudinary Admin API** — Cloudinary's Admin API handles asset management and metadata in addition to transformation.
- **Bunny.net API** — Bunny.net provides CDN, storage, and image optimisation that can sit in front of Contentful asset URLs.

## FAQ

### Why is there no official OpenAPI spec for Contentful Images API?

Contentful does not publish an OpenAPI specification for the Images CDN. Jentic generates and maintains this spec so that AI agents and developers can call Contentful Images API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Contentful Images API use?

The Images API does not require an API token. Each asset URL already contains a signed token between the asset_id and filename, which gates access to private assets. Through Jentic the URL is constructed with the user-supplied token in the path and no additional credential is held in the vault.

### Can I resize and convert images with the Contentful Images API?

Yes. Append URL query parameters to GET /{space_id}/{asset_id}/{token}/{filename} - for example w=800&h=600&fit=fill&fm=webp&q=80 to resize and convert format. Smart cropping uses f=face or f=center.

### What are the rate limits for the Contentful Images API?

Contentful applies CDN-level rate limits per signed URL and per source IP, with cached variants served without counting toward origin transformation quotas. Through Jentic, retries are handled at the SDK level so transient 429 responses do not surface to agent code.

### How do I generate a transformed image URL with the Contentful Images API through Jentic?

Run `jentic.search('transform a contentful image')`, load the operation, and execute with space_id, asset_id, token, filename, and the desired width, height, format, and quality parameters. Jentic returns the transformed CDN URL ready to embed in HTML or pass to the next step.

### Does the Contentful Images API support AVIF and WebP?

Yes. Set fm=avif or fm=webp in the query string to convert any source asset on the fly, with q controlling output quality. The transformed result is cached by the CDN so repeated requests are served instantly.

### Can I limit what my agent is allowed to do with the Contentful Images API?

Yes. Because Jentic One is self-hosted, you decide which operations your agent may call, and your own rules govern its access. The Contentful Images API exposes only a single read-and-transform operation over existing image assets, so an agent scoped to it can resize, crop, and reformat assets but cannot modify, upload, or delete anything. You choose whether to expose even that one transform operation to a given agent.
