2.2 Hyper Art

The HyperArt endpoint generates images based on an uploaded image and a provided text query using the "HyperArt" model. Users must have sufficient credits, which are deducted upon successful image gen

Method: POST

https://sdk.hypergpt.ai/hyperArt

Headers:

Bearer Token

new_user_token

Data :

  • samples (int): The number of image samples to generate.

  • query (str): The text query used to guide the image generation.

  • step (int): The number of steps for the image generation process.

Files :

file (UploadFile): The image file to be used as the base for generation.

Return Value:

  • result (list or dict): The generated images or an error message if an exception occurs.

Example Request:

headers = {
    "Authorization": bearer_token
}

data = {
    "query": query,
    "samples": samples,
    "step": step
}

files = {
    "file": (file.filename, file.file, file.content_type)
}

response = requests.post(
    "https://whale-app-2-ojzej.ondigitalocean.app/hyperArt",
    headers=headers,
    data=data,
    files=files 
)

return response.json()

Example Response (Success):

{
  "datam": [
    "https://example.com/image1.png"
  ]
}

Example Response (File Upload Error):

{
    "message": "There was an error uploading the file"
}

Example Response (Error):

{
    "detail": "Credit not enough"
}

Last updated