Repository navigation
Conversation
A `proxy.provider = "hyper3d"` media variant submits to Hyper3D's Rodin API (`POST /api/v2/rodin`, multipart, the Rodin `tier` from `proxy.path`), polls `POST /status` with `jobs.subscription_key`, and lists results with `POST /download` using the task `uuid`. - Image tasks upload one to five `image_urls` as `images` file parts. The images are fetched through `public_url::client()`, so internal addresses are refused like any other caller-supplied file URL. - A rejection can arrive as HTTP 201 with a non-empty `error`; both the status and the body are checked. - Every job must be `Done`; any `Failed` job fails the task. 429 / 5xx / network errors on a status poll are retried up to 6 times in a row. Submits are never retried. - The callback lists the model file first (the requested `geometry_file_format`, else the first 3D file) and a preview image second, and carries the submit's `consumed` as `usage.credits`. - Only documented Rodin form fields are forwarded; arrays become repeated fields. Host from `HYPER3D_API_BASE` (default https://api.hyper3d.com/api/v2), key from `HYPER3D_API_KEY`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
hyper3dmedia proxy provider for Hyper3D's Rodin 3D generation API, so every Rodin tier can be served as text-to-3D and image-to-3D: Gen-2.5 (Extreme-Low to Extreme-High), Gen-2, and Gen-1/1.5 (Sketch, Regular, Detail, Smooth).POST /api/v2/rodinas multipart. Thetiercomes fromproxy.path. Image tasks upload one to fiveimage_urlsasimagesfile parts. The images are fetched throughpublic_url::client(), so internal addresses are refused.error, so the provider checks both the status and the body.POST /statuswithjobs.subscription_key. Every job must beDone, and anyFailedjob fails the task. Transient poll errors are retried up to 6 times in a row. Submits are never retried.POST /downloadwith the taskuuid. The callback lists the model file first and a preview image second, and carries the submit'sconsumedasusage.creditsfor credit billing.HYPER3D_API_BASE(defaulthttps://api.hyper3d.com/api/v2), key fromHYPER3D_API_KEY.Tests: 9 unit tests cover the form fields, prompt and image rules, rejections inside a 201 body, ids and credits, job status, result file selection, image type detection and the callback body. Clippy with
--all-targetsreports nothing for the new code. The only clippy error is theminimax.rsone fixed in #44.Not yet checked against a live task: the exact
/downloadfile names. Result selection goes by file extension, so it doesn't depend on them.