jhapijhapi Docs
User guideAPI referenceAI ApplicationsHelp
AI Model APIImages

MioRouter images (OpenAI Images)

How to call MioRouter image models on jhapi.org — endpoints and parameters.

Base URL: https://jhapi.org/v1. Auth: Authorization: Bearer <API key>.

Overview

MioRouter image models use the OpenAI Images-compatible API (async jobs; image URLs when complete). HTTP shape matches native OpenAI images; model and required fields differ per model.

Endpoint must match model

  • Text-to-image (Zimage2.0_pro) → POST /v1/images/generations only
  • Edit / face swap / head swap → POST /v1/images/edits only Wrong endpoints return 4xx.

Models and endpoints

ModelEndpointNotes
Zimage2.0_proPOST /v1/images/generationsprompt required; optional size (WxH or auto), seed, prompt_extend
Quenepa_image_edit2.1_proPOST /v1/images/editsprompt + 1–3 input images; billing by input count
Faces_swapPOST /v1/images/editsBase image + face_image
Head_swapPOST /v1/images/editsBase image + head_image

n must be 1. stream is not supported. response_format: url or b64_json.

Flow

Confirm the model is listed

Check GET /v1/models or console model pricing. See List models · MioRouter.

Submit

Pick generations or edits from the table. JSON or multipart/form-data (common for swaps).

Field reference:

Wait for completion

Jobs are async. When done, the gateway returns OpenAI-style data[].url (or b64_json). Do not spam duplicate submits.

Example: text-to-image

curl https://jhapi.org/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Zimage2.0_pro",
    "prompt": "a studio photo of a ceramic mug",
    "size": "1024x1024"
  }'

Billing

  • Zimage2.0_pro, Faces_swap, Head_swap: billed per output image (currently 1 per request).
  • Quenepa_image_edit2.1_pro: rate depends on input image count (1/2/3) — see console pricing.

The authoritative model list is GET /v1/models; if a model is not in the console, it is not callable.