General Principles for Working with the API
All API calls are performed via the HTTPS protocol using the GET or POST parameters. The API returns a response in JSON format, always with an HTTP status code of 200, containing execution status or an error description.
Base URL
All requests must be sent to the following base URL:
https://api.depositphotos.com
Mandatory Parameters
Each API request requires the following mandatory parameters:
dp_apikey: Your unique API key issued upon registration API Suite page.dp_command: The specific API method (command) you want to execute. List of available commands can be found in the API Reference section.
For methods requiring user authorization, an additional mandatory parameter is required:
dp_session_id: A unique session ID, which will be provided in the response after logging in.
For requests, you can use either form-data or JSON format for all variables. If you want to use JSON format, you should:
- Set the
Content-Typeheader toapplication/json. - Pass the
dp_commandparameters in the URL (e.g.,https://api.depositphotos.com?dp_command=login). - Pass the
dp_apikeyparameter and other required parameters in the requestBody (e.g.,{"dp_apikey": "123"}).
Example of a request in JSON format:
curl --silent 'https://api.depositphotos.com/?dp_command=imageGenerator.generate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"dp_apikey": "INSERT_YOUR_API_KEY_HERE",
"dp_session_id": "INSERT_YOUR_AUTH_SESSION_HERE",
"dp_prompt": "A beautiful sunset over the ocean",
"dp_callback_url": "https://example.com/callback",
"dp_aspect_ratio": "1:1",
"dp_medium": "art"
}'
Example of a request in form-data format:
curl --silent https://api.depositphotos.com \
-d 'dp_command=imageGenerator.generate&dp_apikey=INSERT_YOUR_API_KEY_HERE&dp_session_id=INSERT_YOUR_AUTH_SESSION_HERE&dp_prompt=A beautiful sunset over the ocean&dp_callback_url=https://example.com/callback&dp_aspect_ratio=1:1&dp_medium=art'
Response Format
Each API method returns a structured JSON response. The response always includes a type field to indicate the request status:
Success Response Format
{
"timestamp": "2025-02-14 11:14:30",
"version": "1.3",
"type": "success",
"data": { ... }
}
Error Response Format
{
"timestamp": "2025-02-14 11:14:30",
"version": "1.3",
"type": "failure",
"error": {
"errorcode": 403,
"errormsg": "Session ID invalid or session is expired",
"exception": "AuthenticationError"
}
}
API specification
For further details on specific API methods, please refer to the method documentation in the API Reference section.
Also you can Download OpenAPI specification for API Suite.
Available languages abbrev
- 'en' - 'English'
- 'de' - 'Deutsch'
- 'fr' - 'Français'
- 'sp' - 'Español'
- 'ru' - 'Русский'
- 'it' - 'Italiano'
- 'pt' - 'Português'
- 'es' - 'Español'
- 'pl' - 'Polski'
- 'nl' - 'Nederlands'
- 'jp' - '日本語'
- 'cz' - 'Česky'
- 'se' - 'Svenska'
- 'zh' - '中文'
- 'tr' - 'Türkçe'
- 'mx' - 'Español (Mexico)'
- 'gr' - 'Ελληνικά'
- 'ko' - '한국어'
- 'br' - 'Português (Brasil)'
- 'hu' - 'Magyar'
- 'uk' - 'Українська'
- 'ro' - 'Română'
- 'id' - 'Bahasa Indonesia'
- 'th' - 'ไทย'
- 'no' - 'Norsk'
- 'da' - 'Dansk'
- 'fi' - 'Suomi'
- 'mr' - 'मराठी'
- 'hi' - 'हिंदी'
- 'ta' - 'தமிழ்'
- 'ms' - 'Melayu'