Skip to main content
POST
/
api
/
civitai
/
images
/
search
/civitai/images/search
curl --request POST \
  --url https://api.anysite.io/api/civitai/images/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "model_id": 123,
  "model_version_id": 123,
  "username": "PurpleSmartAI",
  "post_id": 123
}
'
[
  {
    "id": 123,
    "@type": "CivitaiImage",
    "url": "<string>",
    "blur_hash": "<string>",
    "width": 123,
    "height": 123,
    "nsfw_level": "<string>",
    "image_type": "<string>",
    "is_nsfw": false,
    "browsing_level": 123,
    "created_at": 123,
    "post_id": 123,
    "username": "<string>",
    "base_model": "<string>",
    "model_version_ids": [],
    "cry_count": 123,
    "laugh_count": 123,
    "like_count": 123,
    "dislike_count": 123,
    "heart_count": 123,
    "comment_count": 123,
    "meta": {}
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Max result count

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
model_id
integer | null

Filter by model id

model_version_id
integer | null

Filter by model version id

username
string | null

Filter by creator username

Example:

"PurpleSmartAI"

post_id
integer | null

Filter by post id

nsfw
enum<string> | null

Maximum adult-content level to include

Available options:
None,
Soft,
Mature,
X
sort
enum<string> | null

Sort order

Available options:
Most Reactions,
Most Comments,
Most Collected,
Newest,
Oldest
period
enum<string> | null

Time window for popularity sorting

Available options:
AllTime,
Year,
Month,
Week,
Day

Response

Successful Response

id
integer
required
@type
string
default:CivitaiImage
url
string | null
blur_hash
string | null
width
integer | null
height
integer | null
nsfw_level
string | null
image_type
string | null
is_nsfw
boolean
default:false
browsing_level
integer | null
created_at
integer | null
post_id
integer | null
username
string | null
base_model
string | null
model_version_ids
integer[]
cry_count
integer | null
laugh_count
integer | null
like_count
integer | null
dislike_count
integer | null
heart_count
integer | null
comment_count
integer | null
meta
object | null