Hy3D 3.6 API Invocation Tutorial: How to Generate High-Precision 3D Models from Images?

Hy3D 3.6 API Invocation Tutorial: How to Generate High-Precision 3D Models from Images?

Summary: This article shows how to call Hy3D 3.6 (model name hy-3d-3.6) with one or more images to generate a high-precision 3D model, and how to decide whether the result is ready to deliver.

Bottom line up front: Hy3D 3.6 is an asynchronous API. A call takes four steps: first, submit images and parameters to /v1/api/3d/submit and get a task ID; then poll the status with /v1/api/3d/query; once the status is completed, download the model from data; finally, review it for acceptance based on the intended use. The minimal call only needs model and one front-view image. To improve precision, you can use Normal textured mode, a target of 2 million faces, 8k textures, and PBR materials; if the view information is insufficient, add side and back views through multi_view_images.

The most common issue isn’t the parameters — it’s the integration setup: a mismatch between the site, API key, and region will return a 401 directly. Another frequent problem is blindly resubmitting after a submit timeout, which leads to duplicate billing. This article walks through each of these in that order.

hy3d-3-6-api-image-to-3d-tutorial-en-image-0

Hy3D 3.6 Knowledge Map

hy3d-3-6-api-image-to-3d-tutorial-en-image-1

Diagram notes: Read the whole thing top to bottom — the main line is “prepare → choose input → choose parameters → submit → poll → download → validate”. There are three loops: when auth returns 401, go back to checking the site and Key; when validation fails, go back to tuning the precision parameters; and when submit times out but you already have the id, go straight into polling instead of resubmitting.

Alt text: Hy3D 3.6 invocation flow diagram — starting from site and Key setup, through auth self-check, single-image or multi-image selection, and parameter selection, to task submission, status polling, result download, and quality acceptance, with separate handling branches for failures and timeouts.

Hy3D 3.6 Tutorial Index

The section numbers map one-to-one to the knowledge map. We recommend starting with Section 1 and getting your account and inputs ready. Section 2 gets the minimal pipeline working and provides complete scripts for submission, polling, and download. Sections 3 and 4 cover improving accuracy and adding viewpoints after you have the pipeline working, so refer to them as needed. Section 5 focuses on error handling; if you hit an error, jump straight to it. Section 6 explains how to judge whether a model is ready for delivery and lays out the cost basis.

This order matters because authentication and input issues can break every later step, so you need to rule them out first. And accuracy parameters only become meaningful to tune once the pipeline is working and you have a baseline to compare against.

Hy3D 3.6 Key Terms

Term Brief explanation
TokenHub Tencent Cloud’s model service platform, through which Hy3D 3.6 exposes its API
Asynchronous task The model isn’t returned immediately after submission; you need to use the task ID to repeatedly query the result
Face count face_count The number of triangular faces in the mesh; higher values mean more detail and larger files
Geometry-only model A model with only geometry, no textures or materials
PBR Physically based rendering materials, which look more realistic under different lighting
GLB / OBJ / STL Common 3D formats: GLB is good for web display, OBJ is widely compatible, and STL is used for 3D printing
request_id A tracking ID for each request; you’ll need to provide it when asking official support to troubleshoot

1 Preparing to Call Hy3D 3.6: Sites, Keys, and Input Images

1.1 Hy3D 3.6 Sites and Region Matching

Hy3D 3.6 is live on both the Tencent Cloud TokenHub China site and the international site, and the model name is hy-3d-3.6 in both cases. Domains can’t be mixed across sites, and a key only works within the site and region that issued it:

  • China site (Guangzhou): tokenhub.tencentmaas.com
  • Tencent Cloud China site · Singapore region: tokenhub-intl.tencentmaas.com
  • International site TokenHub: tokenhub-intl.tencentcloudmaas.com

The Singapore region domain and the international site domain differ by just one segment (tencentmaas vs tencentcloudmaas), so it’s easy to copy the wrong one. Every request authenticates with Authorization: Bearer <Key>. For how to get a key, see the TokenHub key management docs on Tencent Cloud (the link is in the references at the end).

1.2 Hy3D 3.6 Input Image Requirements

Input image quality sets the ceiling for what the model can produce. The main image and the additional views have different specs, so it’s worth checking each item before you submit:

Item Main image (front view) Additional views (multi-image mode)
Field image_url or image_base64, pick one multi_view_images[].view_image_url
Format JPG / JPEG / PNG / WebP JPG / PNG
Edge length 128–5000px greater than 128 and less than 5000px
Size URL file under 10MB; Base64 capped at 6MB provided as a URL
Notes temporary signed URLs need enough validity time view_type takes a fixed enum value

If you’re using a temporary link from object storage, don’t set the expiry to just a few minutes. While the task is queued the server may not have fetched the image yet, and once the link expires the task will fail.

1.3 Hy3D 3.6 Auth Self-Check

Before submitting for real, send a GET /v1/models request to the same domain. A 200 means the key matches the site; a 401 means the key is invalid or doesn’t match. This step doesn’t consume generation quota, so it’s a good fit for the startup phase of your script.

curl -s -o /dev/null -w "%{http_code}\n" \
  https://tokenhub.tencentmaas.com/v1/models \
  -H "Authorization: Bearer $TOKENHUB_API_KEY"

If you’re used to managing multiple models through an aggregator platform, you can hit APIYI apiyi.com’s /v1/models the same way to confirm whether hy-3d-3.6 shows up in the model list available to your account. Whether you can actually call it depends on what the list returns — the API specs in this article all come from the official Tencent Cloud docs.


2 Hy3D 3.6 Minimal Invocation: Submit, Poll, and Download

2.1 Hy3D 3.6 Task Submission

The minimal request only needs the model name and a front-view image. Everything else uses default values: Normal textured mode, a target of 2 million faces, 4k textures, and PBR off.

curl -X POST https://tokenhub.tencentmaas.com/v1/api/3d/submit \
  -H "Authorization: Bearer $TOKENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"hy-3d-3.6","image_url":"https://example.com/front.png"}'

The response includes a task id — save it right away. Default concurrency is 3, so if you have more in-progress tasks than that, you’ll need to queue them on the client side.

2.2 Hy3D 3.6 Polling Task Status

A query request also needs just two fields:

curl -X POST https://tokenhub.tencentmaas.com/v1/api/3d/query \
  -H "Authorization: Bearer $TOKENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"hy-3d-3.6","id":"REPLACE_WITH_JOB_ID"}'

When the status is queued or in_progress, wait a bit and query again. When it’s completed, read type, url, and preview_image_url from data. When it’s failed, stop polling immediately and record the request_id. A task id stays valid for 24 hours—once that window passes you can’t query it anymore, so don’t put off the download.

2.3 Hy3D 3.6 Full Submit-and-Download Script

The script below ties the self-check, submission, polling, and download into a single flow. It also lets you resume an existing job through the HY3D_JOB_ID environment variable, so you don’t end up submitting the same job twice. For the nested paths of the returned fields, go by the examples in the official API docs—the script reads data whether it comes back as a list or as an object. This example has only been statically checked, so run it once with your own key before you wire it in.

View the full Hy3D 3.6 Python script
import os, time, requests

BASE = os.getenv("TOKENHUB_BASE", "https://tokenhub.tencentmaas.com")
KEY = os.environ["TOKENHUB_API_KEY"]
HEADERS = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
MODEL = "hy-3d-3.6"

def check_auth():
    r = requests.get(f"{BASE}/v1/models", headers=HEADERS, timeout=15)
    if r.status_code == 401:
        raise SystemExit("401:Key 无效或与站点/地域不匹配,请检查 BASE 与 Key")
    r.raise_for_status()

def submit(payload: dict) -> str:
    r = requests.post(f"{BASE}/v1/api/3d/submit", headers=HEADERS,
                      json=payload, timeout=60)
    r.raise_for_status()
    body = r.json()
    job_id = body.get("id") or (body.get("data") or {}).get("id")
    print("任务已提交,请保存 id:", job_id)
    return job_id

def query(job_id: str) -> dict:
    r = requests.post(f"{BASE}/v1/api/3d/query", headers=HEADERS,
                      json={"model": MODEL, "id": job_id}, timeout=30)
    r.raise_for_status()
    return r.json()

def get_status(body: dict) -> str:
    if "status" in body:
        return body["status"]
    data = body.get("data")
    return data.get("status", "") if isinstance(data, dict) else ""

def download(items):
    items = items if isinstance(items, list) else [items]
    for i, item in enumerate(items):
        url, ftype = item.get("url"), item.get("type", "bin")
        if not url:
            continue
        name = f"hy3d_result_{i}.{ftype.lower()}"
        with requests.get(url, stream=True, timeout=120) as r:
            r.raise_for_status()
            with open(name, "wb") as f:
                for chunk in r.iter_content(1 << 20):
                    f.write(chunk)
        print("已下载:", name, "预览图:", item.get("preview_image_url"))

def run(payload: dict, interval: int = 10, max_wait: int = 1800):
    check_auth()
    job_id = os.getenv("HY3D_JOB_ID") or submit(payload)
    start = time.time()
    while time.time() - start < max_wait:
        body = query(job_id)
        status = get_status(body)
        if status in ("queued", "in_progress"):
            time.sleep(interval)
            continue
        if status == "completed":
            return download(body.get("data"))
        if status == "failed":
            raise SystemExit(f"任务失败,request_id={body.get('request_id')}")
        raise SystemExit(f"未知状态:{body}")
    print("轮询超时,任务可能仍在进行,可设置 HY3D_JOB_ID 继续查询:", job_id)

if __name__ == "__main__":
    run({"model": MODEL, "image_url": "https://example.com/front.png"})

3 Hy3D 3.6 Fidelity Enhancement Configuration

3.1 Hy3D 3.6 Key Parameters at a Glance

Parameter Values and default Impact on fidelity
generate_type Normal (default, textured) / Geometry (white model) Material-related parameters have no effect in white-model mode
face_count 1000–2000000, default target 2 million In Normal mode, the actual face count may be adjusted
face_strict_mode Enable as needed Once enabled, generates strictly to the target face count
tex_res 2k / 4k / 8k, default 4k Texture clarity; 8k has the most detail
enable_pbr Off by default Outputs PBR materials when enabled
seam_less default false By default, prioritizes preserving detail; when enabled, prioritizes reducing seams
bake_lighting default false Outputs base color by default; when enabled, bakes lighting into the textures
ao_strength 0–1 Only takes effect in multi-view Normal mode
result_format stl / usdz / fbx, single selection Specifies a format in addition to the default output

3.2 Hy3D 3.6 High-Fidelity Request Example

The following is the high-fidelity combination from the official examples: textured, target 2 million faces, 8k PNG texture, PBR enabled. It’s suitable for assets that need close-up display or post-production rendering.

{
  "model": "hy-3d-3.6",
  "image_url": "https://example.com/front.png",
  "generate_type": "Normal",
  "face_count": 2000000,
  "enable_pbr": true,
  "tex_res": "8k",
  "tex_fmt": "png"
}

Only enable face_strict_mode when downstream has a hard requirement on face count, such as an asset polygon budget for a game engine. In Normal mode, the server adjusts the actual face count based on object complexity, which usually benefits quality. Both 8k textures and 2 million faces significantly increase file size, so factor in load times when using them for web display.

3.3 Hy3D 3.6 Differences Between Normal and Geometry Outputs

hy3d-3-6-api-image-to-3d-tutorial-en-image-2

Figure caption: In Normal mode, the default output is OBJ and GLB, and texture and material parameters all take effect; in Geometry mode, only GLB is output by default, and all material options are ignored. Both modes can use result_format to additionally specify one format. For 3D printing, choose Geometry with STL; for AR display in the Apple ecosystem, choose USDZ; for DCC software or game engines, choose FBX.


4 Hy3D 3.6 Single-Image and Multi-Image Calls

4.1 Hy3D 3.6 Single-Image Call

Single-image mode accepts only one front-view image. You must choose either image_url or image_base64, and can’t pass both. When using Base64, keep in mind the 6MB limit. For large images, it’s best to compress them first or switch to passing a URL. In single-image mode, the model has to infer the back and sides on its own, so the best results come from a front view with a complete subject, a clean background, and even lighting.

4.2 Hy3D 3.6 Multi-Image Call

If the back structure and side thickness matter to the result, use multi-image mode. The front view is still passed in through image_url, while the other views go into multi_view_images, where each item contains a view_type and a view_image_url. The available values for view_type are back, left, right, top, bottom, left_front, and right_front, with a maximum of eight images in total.

{
  "model": "hy-3d-3.6",
  "image_url": "https://example.com/front.png",
  "generate_type": "Normal",
  "multi_view_images": [
    {"view_type": "back",  "view_image_url": "https://example.com/back.png"},
    {"view_type": "left",  "view_image_url": "https://example.com/left.png"},
    {"view_type": "right", "view_image_url": "https://example.com/right.png"}
  ],
  "ao_strength": 0.5
}

Additional views only support JPG and PNG; WebP needs to be converted first. The shooting distance, focal length, and lighting for each view should stay as consistent as possible; otherwise, the model will produce contradictory geometry across the different views. ao_strength only takes effect in this kind of multi-view textured combination.


5 Hy3D 3.6 Error Handling: Authentication, Failures, and Timeouts

Symptom Possible cause What to do
Returns 401 Invalid key, or the key doesn’t match the domain/region Re-verify with GET /v1/models on the same domain
401 even though the key is confirmed correct Mixing up the Singapore region domain with the international site domain Check tencentmaas vs tencentcloudmaas
Task status is failed Image can’t be fetched, spec mismatch, etc. Stop polling, keep the request_id, and contact support
Submit request times out Network dropped, but the task may already have been created If you already have an id, only query it — don’t create a new task
Query says the task doesn’t exist Task id has exceeded its 24-hour validity window Resubmit, and improve your download timing

5.1 Troubleshooting Hy3D 3.6 Authentication Errors

A 401 is almost always a configuration issue rather than a service outage. When debugging, confirm three things in order: which site issued the key, which domain the request is going to, and whether the header is Bearer followed by a space and then the key. Using GET /v1/models as a minimal reproduction isolates the problem from the generation pipeline.

5.2 Handling Failed Hy3D 3.6 Tasks

Don’t retry failed tasks endlessly. First check whether the input image URL is publicly accessible, whether the link has expired, and whether the dimensions fall within the 128–5000px range — then decide whether to resubmit. If you need official support, provide the request_id; it’s the only clue they have for pinpointing the problem.

5.3 Hy3D 3.6 Submit Timeouts and Duplicate Billing

A timeout on the submit endpoint doesn’t mean the task wasn’t created. If the response already returned an id, the right move is to go straight to querying. If you genuinely didn’t get an id, wait a while before deciding whether to resubmit. Tencent Cloud bills by successful result, so blindly resubmitting creates multiple successful tasks that are each billed separately — which is exactly why the script above supports resuming a task via HY3D_JOB_ID.

6 Hy3D 3.6 Quality Acceptance and Cost

6.1 Pre-checking Input Images for Hy3D 3.6

A bad input image still burns a paid request. Before you submit, run a quick pre-check with a vision model: is the subject fully in frame and centered, is the background clean, is anything badly occluded? The example below calls a vision model through APIYI’s OpenAI-compatible endpoint — just swap in whichever vision model is available on your account.

import openai

client = openai.OpenAI(
    api_key="YOUR_APIYI_KEY",
    base_url="https://api.apiyi.com/v1"  # APIYI OpenAI-compatible endpoint
)

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": [
        {"type": "text", "text": "这张图用于图生3D。请判断:主体是否完整居中、背景是否干净、是否有遮挡或强反光。只回答 PASS 或 FAIL 加一句原因。"},
        {"type": "image_url", "image_url": {"url": "https://example.com/front.png"}}
    ]}]
)
print(resp.choices[0].message.content)
View the full code for batch pre-checking before submission
import openai

client = openai.OpenAI(
    api_key="YOUR_APIYI_KEY",
    base_url="https://api.apiyi.com/v1"
)

PROMPT = ("这张图用于图生3D。请判断主体是否完整居中、背景是否干净、"
          "是否有遮挡或强反光。第一行只输出 PASS 或 FAIL,第二行给出原因。")

def precheck(url: str, model: str = "gpt-4o-mini") -> bool:
    resp = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": [
            {"type": "text", "text": PROMPT},
            {"type": "image_url", "image_url": {"url": url}}
        ]}]
    )
    text = resp.choices[0].message.content.strip()
    print(url, "->", text.replace("\n", " | "))
    return text.upper().startswith("PASS")

images = ["https://example.com/front.png", "https://example.com/back.png"]
if all(precheck(u) for u in images):
    print("预检通过,可以提交 Hy3D 3.6 任务")
else:
    print("存在不合格图片,请重新拍摄或处理后再提交")

🚀 Quick start: Side steps like this pre-check see very little traffic, so they’re a good fit for the free trial credits APIYI (apiyi.com) gives new users — get the flow working first, then decide whether to fold it into your batch pipeline.

6.2 Hy3D 3.6 Finished Asset Acceptance Checklist

Acceptance criteria vary by use case—don’t check every model against the same set of standards:

  • 3D printing: Prefer Geometry plus STL. After importing it into slicing software, check whether the real-world dimensions need scaling, whether any wall thickness is too thin, and whether it slices cleanly without broken faces.
  • Web display: Use GLB. Check file size and load time, rotate the model on common devices to inspect textures for obvious seams, and if needed reduce texture resolution to 4k or lower the polygon count.
  • Rendering and art: Enable PBR, keep bake_lighting off by default, and output base colors so you can relight the model in a rendering engine.

If the result doesn’t pass acceptance, go back to Section 3 and adjust the parameters first. If it’s still not good enough, add views as described in Section 4.2—that’s more effective than repeatedly retrying with the same image.

6.3 Hy3D 3.6 Official Billing Basis

The prices below are from the official Tencent Cloud page at the time of writing. They’re Tencent Cloud’s original vendor pricing, not APIYI’s own pricing:

Site Pricing basis Credits Conversion
China site Billed per successful result 25–75 credits/run ¥0.12/credit, approx. ¥3–9/run
International site Single-image untextured model 25 credits $0.50
International site Multi-image untextured model 45 credits $0.90
International site Single-image textured model 55 credits $1.10
International site Multi-image textured model 75 credits $1.50

The price range and itemized prices on the same international site page don’t match. This table uses the itemized prices explicitly listed on the page; your actual bill is the final authority. If you access the service through a third-party platform such as APIYI apiyi.com, use the price shown on that platform and don’t apply the table above directly.


Common FAQ

Q1: What is Hy3D 3.6?

Hy3D 3.6 is Tencent Hunyuan’s image-to-3D model, listed on TokenHub as `hy-3d-3.6`. It generates textured models or untextured (white) models from one or more images, and uses an asynchronous API — you submit the job first, then poll for the result.

Q2: How do I choose between Normal and Geometry mode in Hy3D 3.6?

Pick `Normal` when you need textures and materials — that’s the default mode, and it outputs OBJ and GLB. Pick `Geometry` when you only need the shape itself, for example 3D printing or structural review; in that case the material parameters have no effect.

Q3: How long are Hy3D 3.6 task results kept?

A task ID stays valid for 24 hours. Once the status turns `completed`, download the result as soon as you can and move it into your own storage — don’t treat the query endpoint as long-term storage.

Q4: What specific use cases is Hy3D 3.6 good for?

– **3D product display for e-commerce**: generate a GLB and embed it in a web viewer
– **AR preview on Apple devices**: output USDZ via `result_format`
– **Figurine and part prototyping**: `Geometry` plus STL, then straight into your slicing software
– **Game prototype assets**: output FBX, import it into the engine, then decimate the mesh

Q5: Can I call Hy3D 3.6 through APIYI?

Check the model list on your own account: request `https://api.apiyi.com/v1/models` with your key and see whether `hy-3d-3.6` is included. Even if it isn’t listed for now, you can still follow the approach in Section 6.1 of this article — use a single key through APIYI apiyi.com to run the visual model input pre-check, while the 3D generation part keeps going through Tencent Cloud’s official API.

Q6: The key is correct, but I keep getting 401 — what now?

The most common cause is the wrong domain: the Singapore region of Tencent Cloud’s China site uses `tokenhub-intl.tencentmaas.com`, while the international site uses `tokenhub-intl.tencentcloudmaas.com`, and keys from one can’t be used on the other. Just request `GET /v1/models` against the domain that issued your key to confirm.

Q7: What are the known limitations of Hy3D 3.6?

– **Concurrency**: 3 concurrent tasks by default, so batch jobs need to be queued on the client side
– **Face count**: in normal mode the actual polygon count may get adjusted; turn on `face_strict_mode` when you need an exact count
– **Input**: additional views don’t support WebP, and expired temporary URLs will cause the task to fail
– **Billing**: pricing is subject to the official page and your actual bill; resubmitting after a timeout may result in duplicate charges


Hy3D 3.6 Key Takeaways

  • Model invocation: Call submit first to get an id, then poll with query, and once the status is completed, download from data.
  • Run an auth self-check first: The site, API key, and region must all match. Use GET /v1/models for a minimal reproduction.
  • Minimal invocation: The model name plus one front-view image is enough. Get the pipeline working first, then tune for accuracy.
  • High-accuracy combination: Normal plus 2 million faces plus 8k textures plus PBR — file size will increase noticeably.
  • Not enough views? Use multiple images: Add views through multi_view_images, up to eight images total.
  • Don’t resubmit after a timeout: Once you have the id, only query — avoid duplicate charges.
  • Validate by use case: Use STL for 3D printing and verify dimensions and wall thickness; use GLB for web display. You can handle input pre-checks with the vision model from APIYI apiyi.com.

The final acceptance criterion is simple: a model passes only if it can be imported into the target environment (slicer software, web viewer, or rendering engine) and used without manual fixes. We recommend first using a clean front-view image to run through the script in Section 2, then improving accuracy step by step according to Sections 3 and 4, and using the free quota from APIYI apiyi.com to wire in the input pre-check step as well.


📚 References

  1. Tencent Cloud TokenHub Hy3D 3.6 Integration Guide (China Site): Endpoints, parameters, and response descriptions

    • Link: cloud.tencent.com/document/product/1823/141364
    • Note: The main source for the parameter and status descriptions in this article
  2. Tencent Cloud TokenHub Pricing (China Site): Credits and unit prices

    • Link: cloud.tencent.com/document/product/1823/130055
    • Note: Used to verify the China site’s billing tiers
  3. Tencent Cloud TokenHub Billing Rules: Rules for billing based on successful results

    • Link: cloud.tencent.com/document/product/1823/130054
    • Note: Used to understand the cost risk of duplicate submissions
  4. Tencent Cloud TokenHub API Key Management: Creating and using keys

    • Link: cloud.tencent.com/document/product/1823/130090
    • Note: Used to check which site a key belongs to when troubleshooting 401 errors
  5. Tencent Cloud International Site Pricing and API Docs: Itemized pricing and endpoints for the international site

    • Link: tencentcloud.com/document/product/1300/78937
    • Link: tencentcloud.com/document/product/1300/86390
    • Note: Users on the international site should refer to these two pages
  6. Hy3D 3.6 Campaign Page: Official campaign information

    • Link: cloud.tencent.com/act/pro/hy3d-3.6
    • Note: Discount information is subject to what the campaign page shows in real time

Author: APIYI Technical Team
Technical Discussion: Feel free to contact us through the APIYI homepage. For more integration resources, check out the docs.apiyi.com documentation center

Similar Posts