API Reference

Complete reference for the SmileGeni 2D image processing API. The API accepts image uploads and returns AI-enhanced results.

Authentication

All API requests must include an Authorization header with a Bearer token:

Authorization: Bearer YOUR_API_KEY

API keys follow the format sk-prod-... and are issued per tenant. Request an API key or contact support to rotate an existing key.

Security

Never share your API key publicly. If you suspect a key has been compromised, contact support immediately to have it rotated.

Process Image

POST/process_image

Processes an uploaded image with AI-powered enhancement and/or whitening. The request must be sent as multipart/form-data.

Parameters

ParameterTypeDefaultDescription
imagerequiredfileImage file to process. Supported formats: PNG, JPG, JPEG, GIF, BMP, WEBP.
AI-Strengthinteger3Processing intensity. Range: 1–10. Higher values apply more iterations.
enhancementbooleantrueEnable image enhancement (face restoration and sharpening).
whiteningbooleanfalseEnable teeth whitening processing.
whitening_strengthfloat0.85Whitening intensity. Range: 0.0–1.0.
whitening_brightness_boostfloat1.45Brightness multiplier for the teeth region. Range: 1.0–2.0.
whitening_yellow_reductionfloat0.5Yellow tone reduction intensity. Range: 0.0–1.0.

Workflow Modes

The API supports three workflow modes depending on the combination of enhancement and whitening flags:

Enhancement Only

AI face restoration with sharpening. This is the default workflow.

enhancement=true, whitening=false

Enhancement + Whitening

Full processing pipeline: enhancement followed by teeth whitening.

enhancement=true, whitening=true

Whitening Only

Teeth whitening without face enhancement processing.

enhancement=false, whitening=true

Request Format

  • Content-Type: multipart/form-data
  • Method: POST
  • Base URL: https://eu.api.smilegeni.ai

Response

Success (200 OK)

Returns the processed image as binary data. The response Content-Type header indicates the image format.

Error Responses

Status CodeDescriptionCommon Causes
400 Bad RequestThe request is malformed or missing required fields.Missing image file, invalid parameter values
401 UnauthorizedAuthentication failed.Missing or invalid API key
413 Payload Too LargeThe uploaded image exceeds the size limit.Image file is too large
429 Too Many RequestsRate limit exceeded.Too many requests in a short period
500 Internal Server ErrorAn error occurred during processing.Server-side issue; retry or contact support

Examples

Default Enhancement

Basic image processing with default settings:

1curl -X POST "https://eu.api.smilegeni.ai/process_image" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -F "image=@photo.png" \
4 -F "AI-Strength=3"

Enhancement with Whitening

Full pipeline with both enhancement and whitening enabled:

1curl -X POST "https://eu.api.smilegeni.ai/process_image" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -F "image=@photo.png" \
4 -F "AI-Strength=3" \
5 -F "enhancement=true" \
6 -F "whitening=true"

Whitening Only

Apply teeth whitening without enhancement:

1curl -X POST "https://eu.api.smilegeni.ai/process_image" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -F "image=@photo.png" \
4 -F "enhancement=false" \
5 -F "whitening=true" \
6 -F "whitening_strength=0.9"

Custom Whitening Parameters

Fine-tune whitening with custom strength, brightness, and yellow reduction:

1curl -X POST "https://eu.api.smilegeni.ai/process_image" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -F "image=@photo.png" \
4 -F "whitening=true" \
5 -F "whitening_strength=0.7" \
6 -F "whitening_brightness_boost=1.3" \
7 -F "whitening_yellow_reduction=0.6"
Testing Your Integration

You can also test the API interactively through the web portal at https://eu.api.smilegeni.ai. Sign in with your API key to upload images, adjust parameters, and view results in real time.