POST
/
v1
/
image
/
generate
from PIL import Image
from vlmrun.client import VLMRun

client = VLMRun(api_key="<VLMRUN_API_KEY>")
response = client.image.generate(
    images=[Image.open("<path>.jpg")],
    domain="<domain>"
)
{
  "usage": {
    "elements_processed": 123,
    "element_type": "image",
    "credits_used": 123,
    "steps": 123,
    "message": "<string>"
  },
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "response": "<any>",
  "status": "pending"
}

For all supported image domains, see the Hub Catalog.

from PIL import Image
from vlmrun.client import VLMRun

client = VLMRun(api_key="<VLMRUN_API_KEY>")
response = client.image.generate(
    images=[Image.open("<path>.jpg")],
    domain="<domain>"
)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to the VLM API (i.e. structured prediction).

Response

201
application/json

Successful Response

Base prediction response for all API responses.