2.1 Hyper Portraits

The HyperPortraits endpoint generates images based on a provided text query using the Hyper Portraits model. Users must have sufficient credits, which are deducted upon successful image generation.

Method: POST

https://sdk.hypergpt.ai/hyperPortraits

Headers:

Bearer Token

new_user_token

Params:

  • query (str): The text query used to generate the images.

  • number (int): The number of images to generate.

  • width (int, optional): The width of the images. Default is None.

  • height (int, optional): The height of the images. Default is None.

Example Request (Python):

headers = {
        "Authorization": bearer_token
    }
    
params = {
        "query": query,
        "number": number,
        "width": widht,
        "height": height
    }
    
response = requests.post(
        "https://sdk.hypergpt.ai/hyperPortraits",
        headers=headers,
        params=params
    )
    
return response.json()

Example Response (Success):

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

Example Response (Error):

{
    "detail": "Credit not enough"
}

Last updated