Skip to main content
PATCH
/
imgs
/
{image_id}
Modify 1 image
curl --request PATCH \
  --url https://api.wesog.com/imgs/{image_id} \
  --header 'API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "src": "https://cdn.example.com/image/source.jpg",
  "url_img_watermark": "https://cdn.example.com/image/wm.jpg",
  "url_img_thumbnail": "https://cdn.example.com/image/thumb.jpg",
  "title": "image123",
  "headline": "Sunset over the Hudson River",
  "caption": "A vibrant orange sunset reflecting on the river with the city skyline in silhouette.",
  "alt_text": "<string>",
  "ai_generated": true,
  "model_release": true,
  "property_release": true,
  "nsfw": true,
  "status": "Active",
  "date": "2024-10-19",
  "location": "123 Main St, near Central Park",
  "city": "New York",
  "country": "United States",
  "event": "Oscar awards 2024",
  "author": "Jane Doe",
  "provider": "Acme Inc.",
  "shot": "Portrait",
  "scene": "Town square",
  "technique": "Drawing",
  "medium": "Oil on canvas",
  "keywords": [
    "Tree",
    "Dog",
    "Ball",
    "Water"
  ],
  "categories": [
    "Sport",
    "Fashion",
    "Politics"
  ],
  "collections": [
    "Steet pics",
    "Exclusive"
  ]
}
'
{
  "method": "add",
  "resource": "video",
  "num_total": 123,
  "num_good": 123,
  "num_bad": 123,
  "is_started": true,
  "is_finished": true,
  "all_good": true,
  "do_wait": true,
  "do_urgent": true,
  "do_strict": true,
  "idle_ms": 123,
  "exec_ms": 123,
  "created_at": "<string>",
  "started_at": "<string>",
  "finished_at": "<string>",
  "errors": [
    {
      "id": 123,
      "msg": "<string>"
    }
  ]
}

Authorizations

API-Key
string
header
required

Query Parameters

wait
boolean
default:false

Wait for completion?

urgent
boolean
default:false

Enqueue at head of queue if True

strict
boolean
default:false

Use strict mode if True

lang
string
default:es

en|es|pt|fr|ru

Body

application/json
src
string | null

Url of the image in high or medium resolution (used as source for the AI)

Example:

"https://cdn.example.com/image/source.jpg"

url_img_watermark
string | null

URL of the watermarked image.

Example:

"https://cdn.example.com/image/wm.jpg"

url_img_thumbnail
string | null

URL of the thumbnail image.

Example:

"https://cdn.example.com/image/thumb.jpg"

title
string | null

A shorthand reference for the image.

Example:

"image123"

headline
string | null

Short text describing the image.

Example:

"Sunset over the Hudson River"

caption
string | null

Long text describing the image.

Example:

"A vibrant orange sunset reflecting on the river with the city skyline in silhouette."

alt_text
string | null

Text describing the visual appearance of an image (Accessibility).

ai_generated
boolean | null

Image generated by Artificial Intelligence.

model_release
boolean | null

image with model release.

property_release
boolean | null

image with property release.

nsfw
boolean | null

Image Not Safe For Work.

status
string | null

Current status of the image.

Example:

"Active"

date
string | null

Date of the image creation in year-month-day format. Capture date for photographies.

Example:

"2024-10-19"

location
string | null

A detailed description of the location, complementing the specified country and city with additional details such as street address or notable landmarks.

Example:

"123 Main St, near Central Park"

city
string | null

Name of the country.

Example:

"New York"

country
string | null

Name of the country.

Example:

"United States"

event
string | null

Related event

Example:

"Oscar awards 2024"

author
string | null

The name of the individual or entity responsible for creating the image, such as a photographer or painter.

Example:

"Jane Doe"

provider
string | null

The identifier of the provider, which can be either a unique numeric ID or a descriptive name.

Example:

"Acme Inc."

shot
string | null

Type of photography shot.

Example:

"Portrait"

scene
string | null

Spot, place, visual location

Example:

"Town square"

technique
string | null

The specific method or process used in creating the artwork, reflecting the artist's unique approach or the traditional methods tied to certain mediums.

Example:

"Drawing"

medium
string | null

The material or substance used in the creation of the artwork or object. This field corresponds to various artistic mediums like oils, acrylics, or digital formats.

Example:

"Oil on canvas"

keywords
string[] | null

Specific tags describing the image

Example:
["Tree", "Dog", "Ball", "Water"]
categories
string[] | null

General categories of the image

Example:
["Sport", "Fashion", "Politics"]
collections
string[] | null

Collections that the image belongs to

Example:
["Steet pics", "Exclusive"]

Response

image successfully modified

Output of:

  • a synchronous (blocking) operation. POST /imgs?wait=true
  • operation status. GET ops/<op_id>
method
enum<string>
required

Operation type based on the HTTP method.

Available options:
add,
upd,
del,
multiple
resource
enum<string>
required

Resource type involved in the operation.

Available options:
video,
image,
celebs
num_total
integer
required

Total of elements.

num_good
integer
required

Number of correctly processed elements.

num_bad
integer
required

Number of failed processed elements.

is_started
boolean
required

Boolean indicating if the operation has started.

is_finished
boolean
required

Boolean indicating if the operations has finished.

all_good
boolean | null
required

Boolean indicating that there is no failed elements yet.

do_wait
boolean
required

Boolean for know if have to wait or not.

do_urgent
boolean
required

Boolean for know if it is an urgent operation.

do_strict
boolean
required

Boolean for know if is required strict operations over DB.

idle_ms
number
required

Duration (milliseconds) between the operation has been created and has started.

exec_ms
number
required

Duration (milliseconds) between the operation has been started and has finished.

created_at
string
required

Creation datetime.

started_at
string
required

Start datetime.

finished_at
string
required

Finalization datetime.

errors
OpError · object[]
required

List of errors that occurred during processing the operation.