Hyper3D API Documentation
DashboardLoginStart For Free
English
English
  • Introduction
  • GET STARTED
    • Get started with Rodin
    • Minimal Example
  • API Specification
    • Overview
    • Rodin Generation
    • Check Balance
    • Check Status
    • Download Results
    • Generate Texture
  • Legal
    • Data Retention Policy
      • Privacy Policy
      • Terms of Service
      • Contact Us
Powered by GitBook
On this page

Was this helpful?

  1. API Specification

Generate Texture

PreviousDownload ResultsNextData Retention Policy

Last updated 3 months ago

Was this helpful?

Texture Generation

Texture Generation

Pricing

Each call costs 0.5 credits.

Request

Note: All requests to this endpoint must be sent using multipart/form-data to properly handle the file uploads and additional parameters required for the mesh and texture generation process.

Authentication

Authorization: Bearer RODIN_API_KEY

Body

Parameter
Type
Description

image

file/Binary

Required. One binary image file to serve as texture references.

prompt

string

Optional. A texture description to guide texture generation.

model

file/Binary

Required. One binary 3D model file to process. Maximum file size: 10MB

seed

number

Optional. A seed value for randomization in the mesh generation, ranging from 0 to 65535 (both inclusive). If not provided, the seed will be randomly generated.

reference_scale

number

Optional. Represents the reference scale of texture generation process.

geometry_file_format

string

Optional. The format of the output geometry file. Possible values are glb, usdz, fbx, obj, and stl. Default is glb.

material

string

Optional. The material type. Possible values are PBR and Shaded. Default is PBR..

resolution

string

Optional. The resolution of the output texture. Possible values are Basic and High. Default is Basic.

Examples

export RODIN_API_KEY="your api key"
curl https://hyperhuman.deemos.com/api/v2/rodin_texture_only \
  -H "Authorization: Bearer ${RODIN_API_KEY}" \
  -F "image=@/path/to/your/image.jpg" \
  -F "model=@path/to/your/model.obj"  \
  -F "reference_scale=1.0" \
  -F "geometry_file_format=glb" \
  -F "material=PBR" \
  -F "resolution=High"
unset RODIN_API_KEY
import requests

# Constants
ENDPOINT = "https://hyperhuman.deemos.com/api/v2/rodin_texture_only"
API_KEY = "your api key"  # Replace with your actual API key
IMAGE_PATH = "/path/to/your/image.jpg"  # Replace with the path to your image
MODEL_PATH = "/path/to/your/model.obj"

# Prepare the headers
headers = {
    'Authorization': f'Bearer {API_KEY}',
}

# Prepare the form data
files = {
    'image': (os.path.basename(IMAGE_PATH), image_data, 'image/jpeg'),
    'model': (os.path.basename(MODEL_PATH), model_data, 'model/obj'),
    'reference_scale': (None, 1.0),
    'geometry_file_format': (None, 'glb'),
    'material': (None, PBR),
    'resolution': (None, 'High'),
}

# Make the POST request
response = requests.post(ENDPOINT, headers=headers, files=files)

# Parse and return the JSON response
print(response.json())
{
  "error": null,
  "message": "Submitted.",
  "uuid": "123e4567-e89b-12d3-a456-426614174000",
  "jobs": {
      "uuids": ["job-uuid-1", "job-uuid-2"],
      "subscription_key": "sub-key-1"
  }
}

Use this API to submit an asynchronous task to our server. You will get a task UUID from the API which can be used to of the the task and when the task is ready.

This API uses bearer key for authentication. You need to include a valid token in the Authorization header for all requests. Refer to the for how to generate an API key for your account.

check the status
download the result
Quickstart section
  • Texture Generation
  • POSTThis API will generate textures and 3D model for the given images, prompt and 3D model.
  • Texture Generation

This API will generate textures and 3D model for the given images, prompt and 3D model.

post
Authorizations
Body
imagestring · binaryRequired
promptstringOptional
modelbinaryRequired
seednumberOptional
geometry_file_formatstring · enumOptionalDefault: glbPossible values:
materialstring · enumOptionalDefault: PBRPossible values:
escorenumberOptionalDefault: 3.5
reference_scalenumberOptionalDefault: 1
resolutionstring · enumOptionalDefault: BasicPossible values:
Responses
201Success
application/json
post
POST /api/v2/rodin_texture_only HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 156

{
  "image": "binary",
  "prompt": "text",
  "model": null,
  "seed": 1,
  "geometry_file_format": "glb",
  "material": "PBR",
  "escore": 3.5,
  "reference_scale": 1,
  "resolution": "Basic"
}
201Success
{
  "error": "text",
  "message": "text",
  "uuid": "text",
  "submit_time": null,
  "jobs": {
    "uuids": [
      "text"
    ],
    "subscription_key": "text"
  }
}