Getty Images Extend API
The Extend API from Getty Images — 1 operation(s) for extend.
The Extend API from Getty Images — 1 operation(s) for extend.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/getty-images-extend-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Getty Images Extend API
version: '3'
description: '
Developer resources for the Getty Images API including SDK, documentation,
release notes, status, notifications and sample code.'
servers:
- url: https://api.gettyimages.com
description: Base URL declared by the provider in apis.yml (roadmap#122).
security:
- Api-Key: []
- OAuth2: []
tags:
- name: Extend
paths:
/v3/ai/image-generations/extend:
post:
tags:
- Extend
summary: Extend a creative image
description: '# AI Generator - Image Extension
Use text prompts and numerical values to extend the content beyond the borders of a image from the Getty Images creative library (excluding illustrations and vectors).
Use of this endpoint is restricted to clients with an AI Generation license product and may result in the deduction of a credit depending on the terms of your license.
To download an extended image, a traditional license product, such as Premium Access, that provides download access to the original creative image is required.
Lastly, downloading an extended image requires the client to first download the original image.
Extension involves adding content to one or more sides of an image by specifying a percentage by which you want the image extended.
This means that the aspect ratio of the generated images will differ from the original unless the same value is specified for all four sides.
Additionally, the pixel dimensions on the longest side will remain the same - 612px for the
images provided in this endpoint''s response, 1024px and 4096px on the images retrieved through the download process.
## The Extend Request
The `ExtendRequest` payload requires one, and only one, reference image (`reference_asset_id`, `reference_generation`) and requires at least one percentage to be greater than zero (`left_percentage`, `right_percentage`, `top_percentage`, or `bottom_percentage`) and accepts the following optional
parameters:
| Parameter | Purpose |
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `reference_asset_id`| Creative image id to modify. |
| `reference_generation`| Generation details of image to modify. |
| `prompt` | The primary text used for the extended portion of the images. |
| `negative_prompt` | Concepts to _exclude_ from the extended portion. |
| `product_id` | If you have multiple AI Generation Getty Images products, indicate which one you would like to use for this generation request. If you have multiple products, this property is _required_. Can be retrieved from products (`GET /v3/products`). |
| `notes` | This is an optional free text parameter often used by clients who wish to include notes specific to their integration. This is for use by Getty Images customers only (not iStock). The products endpoint (`GET /v3/products`) provides this information. |
| `project_code` | If your Getty Images Generative AI product requires project_codes, use of this parameter is required. If your product does not require a project_code, this parameter must be excluded from the request. This is for use by Getty Images customers only (not iStock). The products endpoint (`GET /v3/products`) provides this information. |
| `left_percentage` | Percentage to add to the left side of the image. This must be a float that is equal to or greater than 0. Default is 0. |
| `right_percentage` | Percentage to add to the right side of the image. This must be a float that is equal to or greater than 0. Default is 0. |
| `top_percentage` | Percentage to add to the top side of the image. This must be a float that is equal to or greater than 0. Default is 0. |
| `bottom_percentage` | Percentage to add to the bottom side of the image. This must be a float that is equal to or greater than 0. Default is 0. |
## Fulfilled and Pending Results
In many cases the result of this call will be the final fulfilled result. In these cases, you will see a `HTTP 200 OK`
result and a payload including URLs to the result images and a `generation_request_id` value.
However some generations may take more time than can be accommodated in the initial call. In these cases the result of
this call is `HTTP 202 Accepted` and the payload will only contain a `generation_request_id` value. This value must be
retained by the client for subsequent polling of the `GET v3/ai/image-generations/{generationRequestId}` Get Images Generation endpoint.
## Lifetime of Generated Images
Generated images will be retained for 6 months after generation.
'
requestBody:
description: Request parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ExtendRequest'
text/json:
schema:
$ref: '#/components/schemas/ExtendRequest'
application/*+json:
schema:
$ref: '#/components/schemas/ExtendRequest'
responses:
'200':
description: Returns the result of a request to extend an image
content:
application/json:
schema:
$ref: '#/components/schemas/ImageGenerationsResponse'
'202':
description: Returns the request ID for a pending request to extend an image
content:
application/json:
schema:
$ref: '#/components/schemas/PendingImageGenerationResponse'
'400':
description: InvalidProduct
'403':
description: Product quota exceeded
'404':
description: Image not found
'410':
description: GenerationRequestGone
'429':
description: TooManyConcurrentGenerations
components:
schemas:
ReferenceGeneration:
type: object
properties:
generation_request_id:
type:
- string
- 'null'
description: The id from a previous request to generate images.
index:
type: integer
description: The index of the image from the specific images generation.
format: int32
additionalProperties: false
ImageDataResponse:
type: object
properties:
index:
type: integer
format: int32
is_blocked:
type: boolean
preview_urls:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/PreviewUrl'
description: The preview URLs for the result
url:
type:
- string
- 'null'
additionalProperties: false
PendingImageGenerationResponse:
type: object
properties:
generation_request_id:
type:
- string
- 'null'
additionalProperties: false
ExtendRequest:
type: object
properties:
reference_asset_id:
type:
- string
- 'null'
reference_generation:
$ref: '#/components/schemas/ReferenceGeneration'
prompt:
type:
- string
- 'null'
negative_prompt:
type:
- string
- 'null'
product_id:
type:
- integer
- 'null'
format: int32
project_code:
type:
- string
- 'null'
notes:
type:
- string
- 'null'
left_percentage:
type:
- number
- 'null'
format: float
right_percentage:
type:
- number
- 'null'
format: float
top_percentage:
type:
- number
- 'null'
format: float
bottom_percentage:
type:
- number
- 'null'
format: float
additionalProperties: false
AssetDetail:
type: object
properties:
id:
type:
- string
- 'null'
additionalProperties: false
PreviewUrl:
type: object
properties:
preview_size:
type:
- string
- 'null'
image_url:
type:
- string
- 'null'
width:
type: integer
format: int32
height:
type: integer
format: int32
additionalProperties: false
ImageGenerationsResponse:
type: object
properties:
generation_request_id:
type:
- string
- 'null'
seed:
type:
- integer
- 'null'
format: int32
results:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ImageDataResponse'
original_asset:
$ref: '#/components/schemas/AssetDetail'
additionalProperties: false
securitySchemes:
Api-Key:
type: apiKey
name: Api-Key
in: header
OAuth2:
type: oauth2
flows:
password:
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
refreshUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}
clientCredentials:
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}
authorizationCode:
authorizationUrl: https://api.gettyimages.com/v4/oauth2/auth
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
refreshUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}