API reference
Schemas
The objects the ImgSearch API reads and returns.
https://imgsearch.com/llms.txt
On this page
- GenerationStatus
- GenerationErrorCode
- GenerationReference
- GenerationEstimateRequest
- GenerationCreate
- GenerationEstimateResponse
- GenerationOutput
- Generation
- GenerationUpdate
- Deleted
- Upload
- Export
- Soundtrack
- VoiceoverVideo
- ArLinks
- ErrorCode
- Error
- List
- Api
- Status
- ModelSummary
- Model
- License
- Account
- Balance
- BalanceTransaction
- Limits
- LimitStatus
- Savings
- SavingsSource
- SearchRequest
- SourceStatus
- SearchResult
- AssetCard
- AssetLicense
- DownloadCost
- GenerationEstimate
- DownloadLink
- DownloadHistoryItem
- EventType
- SubscribableEventType
- Event
- EventList
- GenerationEventData
- SideActionEventData
- ExportEventData
- ArEventData
- SoundtrackEventData
- VoiceoverVideoEventData
- BalanceLowEventData
- WebhookTestEventData
- EventSettings
- WebhookEndpoint
- WebhookEndpointWithSecret
- WebhookDelivery
GenerationStatus #
One of:
queued, running, succeeded, failed, canceled
GenerationErrorCode #
Why a generation itself failed. model_refused and output_blocked are content refusals of the model or our output check; do not retry them as they are.
One of:
model_refused, output_blocked, canceled, generation_failed
GenerationReference #
At most one picture to start from.
Type: one of an object with upload_id, an object with generation, an object with photo, an object with url
GenerationEstimateRequest #
| Field | Type | Description |
|---|---|---|
kindrequired |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
model |
string or null | A model id from /models; the kind's default when left out. |
prompt |
string or null | |
options |
object or null | The model's options, as /models/{id} lists them. |
reference |
GenerationReference | At most one picture to start from. |
GenerationCreate #
| Field | Type | Description |
|---|---|---|
kindrequired |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
model |
string or null | A model id from /models; the kind's default when left out. |
prompt |
string or null | |
options |
object or null | The model's options, as /models/{id} lists them. |
reference |
GenerationReference | At most one picture to start from. |
max_usdrequired |
number | The most the user allows this generation to cost, in US dollars, with at most three decimals. At least 0, At most 1000. |
GenerationEstimateResponse #
| Field | Type | Description |
|---|---|---|
object |
"generation_estimate" | |
kind |
string | |
model |
object | |
options |
object | |
price_usd |
number | The price in US dollars. |
per_output_usd |
number | |
outputs |
integer | |
typical_seconds |
integer or null | |
can_generate |
boolean | |
reason |
string or null |
One of:
generator_disabled, email_not_verified, safety_locked, adult_confirmation_required, plan_required, insufficient_balance, storage_full, region_unavailable, model_paused, daily_capacity, busy, spending_not_enabled, spend_cap_reached, null
|
GenerationOutput #
| Field | Type | Description |
|---|---|---|
n |
integer | Its place in outputs, counting from 0: the {n} of /generations/{id}/outputs/{n} and the upscale body. |
mime |
string | |
width |
integer or null | |
height |
integer or null | |
duration |
number or null | |
bytes |
integer or null | |
triangles |
integer or null | |
lyrics |
string or null | |
file_url |
string | A 10-minute link to the file. |
download_url |
string | The same as an attachment. |
expires_at |
string | |
upscale |
object or null | What Upscale 2× would make and cost; null when the picture is too large or not a picture. |
upscaled |
object or null |
Generation #
| Field | Type | Description |
|---|---|---|
object |
"generation" | |
id |
string | |
kind |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
model |
string | |
model_name |
string | |
prompt |
string | |
title |
string or null | |
starred |
boolean | |
options |
object | The options it was made with; a meme's captions are in options.captions, for you to draw. |
status |
GenerationStatus | |
created_at |
string | |
started_at |
string or null | |
finished_at |
string or null | |
estimate_seconds |
integer | |
poll_after_seconds |
integer or null | While queued or running, how long to wait before reading it again. |
waiting |
object or null | |
error |
object or null | |
notice |
string or null | |
quoted_usd |
number | |
charged_usd |
number | |
refunded_usd |
number | |
reference |
object or null | |
outputs |
array of GenerationOutput | |
exports |
object or null | |
soundtrack |
one of Soundtrack, null | |
voiceover_video |
one of VoiceoverVideo, null |
GenerationUpdate #
| Field | Type | Description |
|---|---|---|
title |
string or null | Up to 80 characters; empty goes back to the prompt. |
starred |
boolean | |
captions |
object or null | A meme's captions, each plain text of up to 120 characters; null keeps the saved ones, {} clears them. |
layout |
string |
One of:
classic, modern
|
Deleted #
| Field | Type | Description |
|---|---|---|
object |
"generation" | |
id |
string | |
deleted |
true |
Upload #
| Field | Type | Description |
|---|---|---|
object |
"upload" | |
id |
string | |
mime |
string |
One of:
image/jpeg, image/png, image/webp
|
width |
integer | |
height |
integer | |
bytes |
integer | |
expires_at |
string |
Export #
| Field | Type | Description |
|---|---|---|
object |
"export" | |
key |
string | |
format |
string | |
height_m |
number or null | |
status |
string |
One of:
running, succeeded, failed
|
file_url |
string or null | |
download_url |
string or null | |
bytes |
integer or null | |
error |
string or null |
Soundtrack #
| Field | Type | Description |
|---|---|---|
status |
string |
One of:
running, succeeded, failed
|
n |
integer | |
music_id |
string | |
voice_id |
string or null | |
volume |
integer | |
music_start |
number | |
fade |
boolean | |
duck |
boolean | |
clip_sound |
boolean | |
file_url |
string or null | |
download_url |
string or null | |
error |
string or null |
VoiceoverVideo #
| Field | Type | Description |
|---|---|---|
status |
string |
One of:
running, succeeded, failed
|
video_id |
string | |
n |
integer | |
files |
array of object | |
error |
string or null |
ArLinks #
| Field | Type | Description |
|---|---|---|
object |
"ar_links" | |
status |
string |
One of:
running, succeeded, failed
|
ios_url |
string or null | |
android_url |
string or null | |
expires_at |
string or null | |
error |
string or null |
ErrorCode #
One of:
unauthenticated, token_expired, token_revoked, insufficient_scope, spending_not_enabled, email_not_verified, adult_confirmation_required, safety_locked, access_blocked, region_unavailable, forbidden, not_found, method_not_allowed, content_refused, invalid_request, plan_required, insufficient_balance, spend_cap_reached, storage_full, price_above_max, idempotency_conflict, not_cancelable, still_running, asset_changed, conflict, rate_limited, too_many_active, checks_busy, fair_use_reached, model_paused, daily_capacity, busy, safety_check_unavailable, generator_disabled, api_disabled, server_error, file_unavailable
Error #
| Field | Type | Description |
|---|---|---|
errorrequired |
object |
List #
| Field | Type | Description |
|---|---|---|
objectrequired |
"list" | |
datarequired |
array of any | |
has_morerequired |
boolean | |
next_cursorrequired |
string or null |
Api #
| Field | Type | Description |
|---|---|---|
object |
"api" | |
name |
string | |
version |
string | |
docs_url |
string or null | The developer docs; null while they are not published. |
openapi_url |
string | |
status_url |
string | |
authentication |
string |
Status #
| Field | Type | Description |
|---|---|---|
object |
"status" | |
api |
object | |
generator |
object | |
models_paused |
array of string |
ModelSummary #
| Field | Type | Description |
|---|---|---|
object |
"model" | |
id |
string | |
kind |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
name |
string | |
maker |
string | |
tagline |
string | |
badges |
array of string | |
default |
boolean | The kind's default model. |
paused |
boolean | |
accepts_reference |
boolean | |
typical_seconds |
integer | |
usd_from |
number | The cheapest single output without a reference, in US dollars. |
usd_to |
number | The dearest single output without a reference, in US dollars. |
price_label |
string |
Model #
| Field | Type | Description |
|---|---|---|
object |
"model" | |
id |
string | |
name |
string | |
maker |
string | |
tagline |
string | |
best_for |
array of string | |
commercial |
true | |
rights_note |
string or null | |
paused |
boolean | |
degraded |
boolean | |
kinds |
object | One entry per kind that offers the model, keyed by kind: its options, its price table in US dollars (pricing: price_usd, min_price_usd and per_reference_usd are rates; a quote rounds up to $0.001 and to at least min_price_usd), typical seconds, default_usd, default, accepts_reference, usd_from and usd_to, and what the kind adds (references for images, frames for video, voices for speech). |
License #
| Field | Type | Description |
|---|---|---|
object |
"license" | |
source |
string |
One of:
photo, video, svg, svg_pack, brand, sound_effect, sfx_pack, 3d_model, 3d_kit, generation
|
name |
string | |
license_url |
string | |
terms_url |
string | |
attribution |
string | |
varies_per_item |
boolean | |
allowed |
array of string | |
not_allowed |
array of string | |
key |
string |
The license key the row's words describe.
One of:
imgsearch_content, game_asset, mit, brand, own_generation
|
variants |
array of object | The other license keys a card of this source can carry, each in its own words. |
Account #
| Field | Type | Description |
|---|---|---|
object |
"account" | |
id |
string | A stable id that is not the internal one. |
email |
string | |
email_verified |
boolean | |
plan |
object | The account's plan. Left out for ChatGPT. |
adult_confirmed |
boolean | |
can_generate |
boolean | |
generate_blocked_reason |
string or null |
One of:
generator_disabled, email_not_verified, safety_locked, adult_confirmation_required, plan_required, insufficient_balance, storage_full, spending_not_enabled, spend_cap_reached, null
|
connection |
object |
Balance #
Every amount in US dollars.
| Field | Type | Description |
|---|---|---|
object |
"balance" | |
available_usd |
number | |
held_usd |
number | Plan and gift balance that waits for a paid plan. |
held_reason |
string or null |
One of:
plan_required, null
|
by_source_usd |
object | |
lots |
array of object | |
next_grant |
object or null |
BalanceTransaction #
Every amount in US dollars.
| Field | Type | Description |
|---|---|---|
object |
"balance_transaction" | |
id |
string | |
direction |
string |
One of:
credit, debit
|
amount_usd |
number | |
balance_after_usd |
number | |
reason |
string | |
source |
string |
One of:
generation, svg_studio, svg_edit, image_editor, plan, top_up, gift, adjustment, expiry, payment_refunded, other
|
refunded |
boolean | |
refund_of |
string or null | |
created_at |
string | |
job |
object or null |
Limits #
| Field | Type | Description |
|---|---|---|
object |
"limits" | |
requests |
object or null | |
search |
LimitStatus | |
downloads |
LimitStatus | |
fair_use |
object | |
generations |
object |
LimitStatus #
| Field | Type | Description |
|---|---|---|
status |
string |
One of:
ok, limited
|
retry_after_seconds |
integer or null |
Savings #
| Field | Type | Description |
|---|---|---|
objectrequired |
"savings" | |
monthrequired |
string | |
starts_atrequired |
string | |
ends_atrequired |
string | |
recordingrequired |
boolean | Whether savings are being recorded for this account now. |
reusesrequired |
integer | Every counted reuse of the month. |
estimated_reuses |
integer or null | The reuses the account could have paid for (a paid plan or bought AI balance). Not sent to ChatGPT. |
estimated_usd |
number or null | What generating those instead would have cost, in US dollars before VAT, at search-time prices. Null when no reuse of the month had an estimate. Not sent to ChatGPT. |
by_sourcerequired |
object |
SavingsSource #
| Field | Type | Description |
|---|---|---|
reusesrequired |
integer | |
estimated_usd |
number or null |
SearchRequest #
| Field | Type | Description |
|---|---|---|
queryrequired |
string | What you need, in plain English: subject, setting, purpose and constraints. At most 500 characters. |
types |
array of string |
The sources to search. Default: own generations (while the personal index is on) and every public type. generation answers not_available while the personal index is off, or with a note while the account's Search my creations is off.
One of:
photo, video, svg, svg_pack, brand, sound_effect, sfx_pack, 3d_model, 3d_kit, generation
At least 1 items, At most 10 items. |
kind |
string or null |
What you would generate instead, for the estimate. Inferred when every type maps to one kind.
One of:
image, video, audio, meme, music, sound, 3d, vector, null
|
filters |
object | Hard filters. A source a filter does not apply to is searched without it and lists it in ignored_filters. With a filter, photos and videos look at their best 300 candidates; SVGs, brands, sounds and 3D models at their best 120. |
limit |
integer |
At least 1, At most 30. Default 10. |
include_scores |
boolean |
Adds the raw score and its space to each result.
Default false. |
cursor |
string or null | The next_cursor of the previous page; repeat the same body with it. It works for 60 minutes; after that the answer is 422 invalid_request (details.fields.cursor), so search again without it. At most 512 characters. |
SourceStatus #
| Field | Type | Description |
|---|---|---|
statusrequired |
string |
unavailable failed just now (retry); not_available is closed or not offered yet (do not retry).
One of:
ok, no_results, unavailable, not_available
|
retryablerequired |
boolean | |
note |
string | |
ignored_filters |
array of string |
SearchResult #
| Field | Type | Description |
|---|---|---|
object |
"search_result" | |
id |
string | srch_ and a ULID. |
complete |
boolean | False when a requested source failed just now; search again before generating. |
sources |
object | |
results |
array of AssetCard | |
generation_estimate |
one of GenerationEstimate, null | |
generation_estimate_reason |
string |
Only when generation_estimate is null.
One of:
kind_ambiguous, no_generator_for_type, no_model_available, no_results
|
fair_use |
object | |
next_cursor |
string or null | |
depth_limited |
boolean | True when the 100-deep cap ended the list. |
AssetCard #
Every card has the fields below; the type-specific ones appear for their types only.
| Field | Type | Description |
|---|---|---|
type |
string |
One of:
photo, video, svg, svg_pack, brand, sound_effect, sfx_pack, 3d_model, 3d_kit, generation
|
id |
string | For own generations: {generation_id}:{n}. |
title |
string | |
description |
string | For own generations: your own prompt. |
relevance |
number or null | Comparable across sources; null while a source has no fitted scores. At least 0, At most 1. |
band |
string or null |
One of:
strong, possible, weak, null
|
owned |
boolean | Downloaded before; downloading it again is free. |
made_by_you |
boolean | |
community |
boolean | Shared by a contributor. |
preview_url |
string or null | A signed link to the preview: 1 hour, 10 minutes for own generations. |
page_url |
string | |
format |
string | |
license |
AssetLicense | The license of one item, in the words of /v2/licenses. |
download |
DownloadCost | |
score |
number | With include_scores only. The raw cosine score, 4 decimals. |
score_space |
string |
One of:
openai, gemini
|
width |
integer or null | |
height |
integer or null | |
aspect_ratio |
number | |
orientation |
string or null |
Null for own audio and music.
One of:
landscape, portrait, square, null
|
delivered_size |
string | Photos: the size this account downloads, as 1600x900. |
tags |
array of string | |
duration_seconds |
number or null | Null for own pictures, memes, vectors and 3D models. |
has_sound |
boolean or null | Videos: whether the clip has a sound track; null when not known. |
poster_url |
string or null | |
category |
string or null | |
style |
string or null | |
view_box |
string or null | |
backgrounds |
array of string |
One of:
original, transparent
|
pack_id |
string or null | |
item_count |
integer | |
sample_rate |
integer or null | |
channels |
integer or null | |
collection |
string or null | |
duration_label |
string | |
formats_label |
string | |
size |
string or null | |
formats |
array of string | |
triangles |
integer | |
triangles_label |
string | |
height_m |
number | |
footprint_m |
array of number or null | |
kit |
string | |
group |
string or null | |
kind |
string |
Own generations.
One of:
image, video, audio, meme, music, sound, 3d, vector
|
model |
object | Own generations. |
generation_id |
string | Own generations. |
n |
integer | Own generations: the output's number. |
created_at |
string | Own generations. |
starred |
boolean | Own generations. |
AssetLicense #
The license of one item, in the words of /v2/licenses.
| Field | Type | Description |
|---|---|---|
key |
string |
One of:
imgsearch_content, game_asset, mit, brand, own_generation
|
name |
string | |
license_url |
string or null | |
terms_url |
string | |
attribution |
string | |
attribution_text |
string or null | |
usage_conditions |
string or null | |
not_allowed |
array of string | |
ai_generated |
boolean or null | |
community |
boolean | |
notes |
string or null | What the download holds and which notices to keep with it, and for 3D models that they are AI-made. |
DownloadCost #
| Field | Type | Description |
|---|---|---|
fair_use_units |
integer | Units of the monthly fair use a download would use now: 0 when owned, for packs and kits, and for MIT items. |
free |
boolean | |
counter |
string |
Videos count in their own counter; own generations are free and count in none.
One of:
files, videos, none
|
GenerationEstimate #
What generating instead would cost with the kind's default model and options. Never a budget figure.
| Field | Type | Description |
|---|---|---|
kind |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
model |
object | |
options |
object | |
per_output_usd |
number | The price of one output, in US dollars. |
typical_seconds |
integer or null | |
can_generate |
boolean | |
reason |
string or null |
One of:
generator_disabled, email_not_verified, safety_locked, adult_confirmation_required, plan_required, insufficient_balance, storage_full, region_unavailable, model_paused, daily_capacity, busy, spending_not_enabled, spend_cap_reached, null
|
DownloadLink #
| Field | Type | Description |
|---|---|---|
object |
"download_link" | |
type |
string | |
id |
string | |
status |
string |
One of:
ready, refused
|
url |
string or null | |
expires_at |
string or null | |
file_name |
string or null | |
download |
one of DownloadCost, null | |
error |
object or null |
DownloadHistoryItem #
| Field | Type | Description |
|---|---|---|
object |
"download" | |
type |
string |
One of:
photo, video, svg, brand, sound_effect, 3d_model
|
id |
string or null | Null when the item no longer exists. |
title |
string or null | |
downloaded_at |
string | |
charged |
boolean or null | Whether it used a fair-use unit; null for older sound and model rows. |
surface |
string or null |
One of:
web, api, mcp, playground, null
|
EventType #
What an event says. webhook.test goes only to the endpoint it tests.
One of:
generation.succeeded, generation.failed, generation.canceled, generation.export.succeeded, generation.export.failed, generation.ar.succeeded, generation.ar.failed, generation.soundtrack.succeeded, generation.soundtrack.failed, generation.voiceover_video.succeeded, generation.voiceover_video.failed, balance.low, webhook.test
SubscribableEventType #
The event types an endpoint can ask for.
One of:
generation.succeeded, generation.failed, generation.canceled, generation.export.succeeded, generation.export.failed, generation.ar.succeeded, generation.ar.failed, generation.soundtrack.succeeded, generation.soundtrack.failed, generation.voiceover_video.succeeded, generation.voiceover_video.failed, balance.low
Event #
One thing that happened to the account. Short on purpose: no prompt, name, caption or file link; read the generation (GET /generations/{id}) for the rest. A webhook's body is exactly this object.
| Field | Type | Description |
|---|---|---|
idrequired |
string | |
objectrequired |
"event" | |
typerequired |
EventType | What an event says. webhook.test goes only to the endpoint it tests. |
created_atrequired |
string | |
datarequired |
one of GenerationEventData, ExportEventData, ArEventData, SoundtrackEventData, VoiceoverVideoEventData, BalanceLowEventData, WebhookTestEventData |
EventList #
| Field | Type | Description |
|---|---|---|
objectrequired |
"list" | |
datarequired |
array of Event | |
has_morerequired |
boolean | true: send the last id as after for the next ones. |
GenerationEventData #
generation.succeeded, generation.failed and generation.canceled. Field names as in Generation.
| Field | Type | Description |
|---|---|---|
idrequired |
string | |
kindrequired |
string |
One of:
image, video, audio, meme, music, sound, 3d, vector
|
modelrequired |
string | |
statusrequired |
GenerationStatus | |
charged_usdrequired |
number | |
outputsrequired |
array of object | |
errorrequired |
object or null |
SideActionEventData #
| Field | Type | Description |
|---|---|---|
idrequired |
string | The generation's id. |
kindrequired |
string |
ExportEventData #
| Field | Type | Description |
|---|---|---|
idrequired |
string | The generation's id. |
kindrequired |
string | |
exportrequired |
object |
ArEventData #
| Field | Type | Description |
|---|---|---|
idrequired |
string | The generation's id. |
kindrequired |
string | |
arrequired |
object | Once both View in AR copies of one height are finished. |
SoundtrackEventData #
| Field | Type | Description |
|---|---|---|
idrequired |
string | The generation's id. |
kindrequired |
string | |
soundtrackrequired |
object |
VoiceoverVideoEventData #
| Field | Type | Description |
|---|---|---|
idrequired |
string | The generation's id. |
kindrequired |
string | |
voiceover_videorequired |
object |
BalanceLowEventData #
balance.low, once per drop below your threshold and at most once a day.
| Field | Type | Description |
|---|---|---|
available_usdrequired |
number | The spendable AI balance when it was checked, in US dollars. |
below_usdrequired |
number | Your threshold, in US dollars. |
WebhookTestEventData #
| Field | Type | Description |
|---|---|---|
endpoint_idrequired |
string | |
messagerequired |
string |
EventSettings #
| Field | Type | Description |
|---|---|---|
object |
"event_settings" | |
balance_low_below_usd |
number or null |
WebhookEndpoint #
| Field | Type | Description |
|---|---|---|
object |
"webhook_endpoint" | |
id |
string | |
url |
string | |
description |
string or null | |
event_types |
array of SubscribableEventType or null | null for every type. |
status |
string |
One of:
enabled, disabled
|
disabled_reason |
string or null |
One of:
by_user, failing, null
|
failing_since |
string or null | The first failure after the last 2xx, or null. |
last_success_at |
string or null | |
disabled_at |
string or null | |
secret_rotation_ends_at |
string or null | Until then the old secret signs too. |
created_at |
string | |
updated_at |
string |
WebhookEndpointWithSecret #
| Field | Type | Description |
|---|---|---|
object |
"webhook_endpoint" | |
id |
string | |
url |
string | |
description |
string or null | |
event_types |
array of SubscribableEventType or null | null for every type. |
status |
string |
One of:
enabled, disabled
|
disabled_reason |
string or null |
One of:
by_user, failing, null
|
failing_since |
string or null | The first failure after the last 2xx, or null. |
last_success_at |
string or null | |
disabled_at |
string or null | |
secret_rotation_ends_at |
string or null | Until then the old secret signs too. |
created_at |
string | |
updated_at |
string | |
secretrequired |
string | whsec_ and 32 random bytes in base64. Shown only in this answer. |
WebhookDelivery #
| Field | Type | Description |
|---|---|---|
object |
"webhook_delivery" | |
id |
string | The event's id. |
event_type |
EventType | What an event says. webhook.test goes only to the endpoint it tests. |
event_created_at |
string | |
status |
string |
One of:
pending, delivered, failed
|
attempts |
integer | |
next_attempt_at |
string or null | |
last_attempt_at |
string or null | |
response |
object or null | The last attempt's answer: its status, milliseconds, an error word (timeout, failed, redirect, status, address, dns, endpoint_disabled, …) and the first 1,024 bytes of its body. |