Hyper3DHyper3D Docs
API Specification

Generate Images

Synchronously generate or edit images.

POST
/api/v2/images

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

  1. body
prompt*string

Required. Image generation or editing instructions.

size?string
images?array<>
Itemsitems <= 3

Response Body

application/json
  1. response
created?number

Creation time as a Unix timestamp in seconds.

data?array<>
Items1 <= items <= 1
consumed?number

Credits consumed by this request (always 0.5).

error?string
Value in"NO_SUCH_TASK""ASSET_NOT_AVAILABLE""IMAGE_LABEL_LENGTH_TOO_LONG""INVALID_REQUEST""API_NO_ACTIVE_SUBSCRIPTION""API_SUBSCRIPTION_PLAN_TOO_LOW""API_PARALLELISM_LIMIT_REACHED""API_INSUFFICIENT_FUNDS""API_OBJECT_NOT_FOUND_ON_IMAGE""IMAGE_CONTENT_VIOLATION""PERMISSION_DENIED""API_UNKNOWN"
message?string
Example Request
curl -X POST 'https://api.hyper3d.com/api/v2/images' \  -H 'Content-Type: application/json' \  -d '{  "prompt": "string"}'
Example Response
{  "created": 0,  "data": [    {      "b64_json": "string",      "revised_prompt": "string"    }  ],  "consumed": 0,  "error": "NO_SUCH_TASK",  "message": "string"}

/api/v2/images is a synchronous endpoint. It returns exactly one base64-encoded image immediately (HTTP 201) for 0.5 Credits — no polling or download step needed.

Two input modes are supported on the same path:

ModeContent-TypeWhen to use
Text-to-imageapplication/jsonGenerate an image from a prompt only
Image editingmultipart/form-dataEdit or transform one or more reference images

Input

  • prompt (required): Image generation or editing instructions.
  • size (optional): Output dimensions as WIDTHxHEIGHT. Total pixels must be between 512×512 and 2048×2048. Defaults to 2048x2048 for text-to-image, or matches the last input image size for edits.
  • images (optional, multipart only): Up to 3 reference images, each at most 10 MiB. Formats accepted: PNG, JPEG, WebP. Omit for text-to-image.

Text-to-image example

Send the prompt and size as JSON. No files required.

curl --fail-with-body --request POST 'https://api.hyper3d.com/api/v2/images' \
  --header "Authorization: Bearer ${RODIN_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "A majestic snowy owl perched on a frost-covered branch, soft golden hour lighting, hyper-detailed feathers",
    "size": "1024x1024"
  }'

Image editing example

Upload reference images as multipart files alongside the prompt.

curl --fail-with-body --request POST 'https://api.hyper3d.com/api/v2/images' \
  --header "Authorization: Bearer ${RODIN_API_KEY}" \
  --form 'prompt=Add a glowing crescent moon behind the castle, atmospheric fog' \
  --form 'size=1024x1024' \
  --form 'images=@./castle.png'

Response

The successful response arrives immediately and contains the base64 image bytes without a data URL prefix — decode data[0].b64_json to obtain the raw PNG/JPEG/WebP content.

{
  "created": 1728547200,
  "data": [
    {
      "b64_json": "iVBORw0KGgoAAAANSUhEUgAA...",
      "revised_prompt": "A majestic snowy owl perched on a frost-covered branch, soft golden hour lighting, hyper-detailed feathers, photorealistic, 4k"
    }
  ],
  "consumed": 0.5
}
FieldDescription
createdUnix timestamp (seconds) of the request
data[0].b64_jsonBase64-encoded image bytes — decode to save a file
data[0].revised_promptModel-revised prompt that produced the image (may be absent)
consumedCredits consumed by this request (always 0.5)
errorApplication error code if the request failed (absent on success)
messageHuman-readable error description (absent on success)