Claythis Logo

API Documentation

Getting Started

The Claythis API allows you to programmatically generate 3D models from images. All API requests require authentication using your API key.

Base URL

https://claythis.com

Authentication

Include your API key in the request header of all API calls:

X-API-Key: <your_api_key>

If your key is missing or invalid, the API returns 401 Unauthorized.

Content Type

  • • For file uploads, use multipart/form-data
  • • Supported image types: PNG and JPEG
  • • Image URLs are also supported as an alternative to file upload
  • • All responses are returned in JSON format

API Endpoints

Create a 3D generation job from an image

Parameters

image(file)
Image file (PNG or JPEG) - use either this or image_url
image_url(string)
URL of the image - use either this or image file
motions(string (JSON array))
List of specific Quaternius animations to process (e.g., ["Idle_Loop_Rig", "Walk_Loop_Rig"]). If not provided, all 127 Quaternius animations will be processed.

Response Example

{
  "success": true,
  "data": {
    "taskId": "<your_task_id>"
  }
}

Code Examples

# Upload image file (PNG) - All animations
curl -sS -X POST "https://claythis.com/api/3d/generate" \
  -H "X-API-Key: <your_api_key>" \
  -H "Expect:" \
  -F "image=@/path/to/image.png;type=image/png"

# Upload with specific motions
curl -sS -X POST "https://claythis.com/api/3d/generate" \
  -H "X-API-Key: <your_api_key>" \
  -H "Expect:" \
  -F "image=@/path/to/image.png;type=image/png" \
  -F 'motions=["Idle_Loop_Rig", "Walk_Loop_Rig", "Jog_Fwd_Loop_Rig"]'

# Using image URL
curl -sS -X POST "https://claythis.com/api/3d/generate" \
  -H "X-API-Key: <your_api_key>" \
  -H "Expect:" \
  -F "image_url=https://example.com/image.png"

# Check job status
curl -sS -X GET "https://claythis.com/api/3d/generate/<task_id>/status" \
  -H "X-API-Key: <your_api_key>"

Job Status Codes

The generation job transitions through these states:

Available Motions

The API supports 127 Quaternius animations. You can select specific animations by providing a JSON array of motion names via the motions parameter.

  • • If motions is not provided → All 127 animations will be processed
  • • If motions is a JSON array → Only specified animations will be processed
  • • Example: ["Idle_Loop_Rig", "Walk_Loop_Rig", "Jog_Fwd_Loop_Rig"]

Important Notes

  • • The downloadUrl is valid for 1 hour after generation
  • • If the URL expires, call the status endpoint again to get a refreshed download link
  • • The progress field represents completion percentage (0-100)
  • • Progress is based on generation steps completed, not time elapsed
  • • Either provide an image file OR an image URL, not both
  • • If motions parameter is omitted, all 127 Quaternius animations will be included
  • • To process specific animations only, provide a JSON array of motion names (e.g., ["Idle_Loop_Rig"])
  • • Generated models are in GLB format with animations included

Error Handling

400 Bad RequestMissing or invalid parameters
401 UnauthorizedInvalid or missing API key
500 Internal Server ErrorUnexpected processing error

Need Help?

Our dedicated technical support team is here to ensure you have a seamless experience. If you encounter any challenges with API authentication, rate limits, or specific configurations, please reach out. Our experts are available to provide in-depth troubleshooting and personalized guidance for your unique development workflow. Your success with our platform is our top priority. Contact us via our contact page or Discord for comprehensive technical assistance.

    API Documentation - 3D Character Generation | Claythis