# Freja H3 Image — Deepixels Create and edit images with an optimized MiniMax H3 Image model, multiple reference photos and support for up to four LoRAs. Model ID: freja/h3-image Revision: freja-h3-image-v1 Playground: https://www.deepixels.co/explore/freja/h3-image API reference: https://www.deepixels.co/explore/freja/h3-image/api Availability: Enabled Categories: Text to image, Image to image ## API usage Authenticate requests with your Deepixels API key in the x-api-key header. Keep the key server-side; never include it in public source code. Submit POST https://api.deepixels.co/v1/generate with JSON {model, input}. Use the model ID above and the input schema below. Poll GET https://api.deepixels.co/v1/get?jobId=YOUR_JOB_ID with the same x-api-key header, or use a webhook as documented by the API. ## Request body fields - model (string, required): The exact model ID to run. Value: "freja/h3-image". - input (object, required): Model inputs as a JSON object. Supported fields and limits are documented below. - webhook (string, optional): Optional public HTTPS URL. Deepixels sends a POST when the job completes or fails, with the same job body returned by GET /v1/get. Return a 2xx status to acknowledge delivery. Delivery may be retried, so handle repeated job IDs safely. ## Create-job response - jobId (string): The job ID. Use it to read this job's status and result. - status (string): The initial job status. Submission returns before generation finishes. - credit (number): Credits reserved by the server using the current model pricing. This is a response field; do not send it in the request. Expected HTTP 200 response (illustrative; credit is not a quote): ```json { "jobId": "example-job-id", "status": "created", "credit": 1 } ``` ## Get-job response - jobId (string): The job ID. - model (string): The model used by this job. - status (string): Stop polling at completed or failed. Values: created, pending, processing, completed, failed. - input (object | null): The saved model inputs. - webhook (string | null): The callback URL, when supplied. - output (object | null): The current Deepixels job API returns result URL arrays, such as videoUrl, imageUrl or audioUrl when available. It can be null before a result exists. The worker schema below describes worker media metadata, not this job envelope. - date (number | null): Job creation time as a Unix timestamp in milliseconds, when available. - startedAt (number | null): Job start time as a Unix timestamp in milliseconds, when available. - finishedAt (number | null): Job finish time as a Unix timestamp in milliseconds, when available. - durationMs (number | null): Recorded job duration in milliseconds, when available. - resultExpiresAt (number | null): Result expiry time as a Unix timestamp in milliseconds, when available. - recordExpiresAt (number | null): Job record expiry time as a Unix timestamp in milliseconds, when available. Expected HTTP 200 response examples. IDs, URLs and timings are illustrative; stop polling at completed or failed. ### completed ```json { "jobId": "example-job-id", "model": "freja/h3-image", "status": "completed", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } }, "webhook": null, "output": { "imageUrl": [ "https://r2.deepixels.co/results/example-result.png" ] }, "date": 1767225600000, "startedAt": 1767225601000, "finishedAt": 1767225901000, "durationMs": 300000, "resultExpiresAt": 1767312301000, "recordExpiresAt": null } ``` ### processing ```json { "jobId": "example-job-id", "model": "freja/h3-image", "status": "processing", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } }, "webhook": null, "output": null, "date": 1767225600000, "startedAt": 1767225601000, "finishedAt": null, "durationMs": null, "resultExpiresAt": null, "recordExpiresAt": null } ``` ### failed ```json { "jobId": "example-job-id", "model": "freja/h3-image", "status": "failed", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } }, "webhook": null, "output": null, "date": 1767225600000, "startedAt": 1767225601000, "finishedAt": 1767225901000, "durationMs": 300000, "resultExpiresAt": null, "recordExpiresAt": null } ``` ## List requests GET https://api.deepixels.co/v1/model-requests?model=freja%2Fh3-image with the same x-api-key header. Only your jobs for this model are returned, newest first, up to 20 per page. Response: {requests: [{response, source, contractVersion, billing}], next_cursor}. response is the full Get-job response. billing has state, reservedCredits, chargedCredits and refundedCredits; unknown amounts are null. source is playground, api or unknown (informational only). Pass next_cursor as cursor for the next page; null means the end. Temporary media can expire without removing request details. ## Model inputs ### prompt Type: string; required Describe the picture you want, or explain what to change in your references. Use to identify the first reference. Minimum length: 1 character Maximum length: 32,000 characters Example: : keep the person and background, but change the blue top to red. ### images Type: public HTTPS media URL Add optional reference images in order. Each image becomes , , and so on. Remove empty rows before generating. Maximum length: 8,192 characters Example: Add a product photo and ask to place in a new scene. ### parameters.width Type: integer Set the output width in pixels. It rounds to a multiple of 32; use 1024 for a square image. Minimum: 512 Maximum: 8192 Example: 1024 Default: 1024 ### parameters.height Type: integer Set the output height in pixels. The final area must be 0.65536–20 MP, with an aspect ratio from 1:3 to 3:1. Minimum: 512 Maximum: 8192 Example: 1024 Default: 1024 ### parameters.num_outputs Type: integer Choose how many images to create, from 1 to 10. Each image is charged separately and generated in sequence. Minimum: 1 Maximum: 10 Example: 1 Default: 1 ### parameters.output_format Type: string Choose the image file format. PNG keeps full detail; JPEG and WebP offer adjustable compression. Example: png Default: "png" ### parameters.quality Type: integer For JPEG or WebP, choose 1–100. Leave blank to use 95. This setting is not sent for PNG. Minimum: 1 Maximum: 100 Example: 95 ### parameters.seed Type: integer Leave blank for a random result, or enter 0–4294967295 to repeat the starting seed. Later outputs use successive seeds. Minimum: 0 Maximum: 4294967295 Example: 42 ### parameters.loras Type: array Optionally add up to four compatible LoRAs, each with a public Safetensors URL, unique name and weight. Incompatible adapters are skipped with a warning. Maximum items: 4 Example: Name: hair; weight: 0.5 for the previously verified hair adapter. ## Input schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "minLength": 1, "maxLength": 32000, "pattern": "\\S", "description": "Describe the image or edit. Refer to images in order as , , etc. The text encoder uses at most 4096 tokens." }, "images": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": [ "url", "role" ], "properties": { "url": { "type": "string", "format": "uri", "pattern": "^https://", "maxLength": 8192 }, "role": { "const": "reference" } } }, "description": "Optional ordered reference images. Worker accepts single-frame PNG/JPEG/WebP, at most 64 MiB/32 MP per image, 128–8192 pixels per side and aspect ratio 1:4–4:1. Playground uploads have the stricter shared 10 MiB/12 MP limit." }, "parameters": { "type": "object", "additionalProperties": false, "default": {}, "properties": { "width": { "type": "integer", "minimum": 512, "maximum": 8192, "default": 1024, "description": "Output width in pixels, rounded to the nearest multiple of 32; exact ties round down." }, "height": { "type": "integer", "minimum": 512, "maximum": 8192, "default": 1024, "description": "Output height in pixels. Adjusted total area must be 655360–20000000 pixels and aspect ratio 1:3–3:1." }, "num_outputs": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1 }, "seed": { "type": "integer", "minimum": 0, "maximum": 4294967295, "description": "Omit for a random seed. Each next image increments the seed by one, wrapping at 2^32." }, "output_format": { "type": "string", "enum": [ "png", "jpeg", "webp" ], "default": "png" }, "quality": { "type": "integer", "minimum": 1, "maximum": 100, "description": "JPEG/WebP quality; defaults to 95 in the worker. Omit for PNG." }, "loras": { "type": "array", "maxItems": 4, "items": { "type": "object", "additionalProperties": false, "required": [ "url", "name" ], "properties": { "url": { "type": "string", "format": "uri", "pattern": "^https://", "maxLength": 8192 }, "name": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, "weight": { "type": "number", "minimum": -2, "maximum": 2, "default": 1 } } } } }, "allOf": [ { "if": { "required": [ "output_format" ], "properties": { "output_format": { "const": "png" } } }, "then": { "not": { "required": [ "quality" ] } } } ] } } } ``` ## Worker output schema ```json { "type": "object", "additionalProperties": false, "required": [ "schema_version", "results", "metadata" ], "properties": { "schema_version": { "const": 1 }, "results": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "required": [ "type", "url", "content_type", "width", "height", "bytes" ], "properties": { "type": { "const": "image" }, "url": { "type": "string", "format": "uri", "pattern": "^https://", "maxLength": 8192 }, "content_type": { "enum": [ "image/png", "image/jpeg", "image/webp" ] }, "width": { "type": "integer", "minimum": 512, "maximum": 8192 }, "height": { "type": "integer", "minimum": 512, "maximum": 8192 }, "bytes": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "metadata": { "type": "object", "properties": { "seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 } } } } } }, "metadata": { "type": "object", "required": [ "model", "processing_seconds" ], "properties": { "model": { "type": "string" }, "processing_seconds": { "type": "number", "minimum": 0 } } } } } ``` The worker output schema describes model media output. Use the documented Deepixels job response and output URL fields when polling. ## Example: undefined ```json { "model": "freja/h3-image", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } } } ``` ## Submit a generation (cURL) Bash or a compatible shell. Replace the API key placeholder. ```shell curl https://api.deepixels.co/v1/generate \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_DEEPIXELS_API_KEY' \ --data-raw '{"model":"freja/h3-image","input":{"prompt":"A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.","parameters":{"width":1024,"height":1024,"num_outputs":1,"output_format":"png"}}}' ``` ## Submit a generation (JavaScript) Run server-side with Node.js 18 or newer. Set DEEPIXELS_API_KEY in your environment. ```javascript const apiKey = process.env.DEEPIXELS_API_KEY; if (!apiKey) throw new Error("Set DEEPIXELS_API_KEY first."); const request = { "model": "freja/h3-image", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } } }; const response = await fetch("https://api.deepixels.co/v1/generate", { method: "POST", headers: { "Content-Type": "application/json", "x-api-key": apiKey }, body: JSON.stringify(request), }); const job = await response.json(); if (!response.ok) throw new Error(job.message || "Generation request failed."); console.log(job); ``` ## Submit a generation (Python) Python 3, using only its standard library. Set DEEPIXELS_API_KEY in your environment. ```python import json import os import urllib.request payload = json.loads("{\"model\":\"freja/h3-image\",\"input\":{\"prompt\":\"A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.\",\"parameters\":{\"width\":1024,\"height\":1024,\"num_outputs\":1,\"output_format\":\"png\"}}}") request = urllib.request.Request( "https://api.deepixels.co/v1/generate", data=json.dumps(payload).encode("utf-8"), headers={ "Content-Type": "application/json", "x-api-key": os.environ["DEEPIXELS_API_KEY"], }, method="POST", ) with urllib.request.urlopen(request, timeout=60) as response: job = json.load(response) print(job) ``` ## Request body (JSON) Send this JSON body to POST /v1/generate with your x-api-key header. ```json { "model": "freja/h3-image", "input": { "prompt": "A premium editorial photograph of a sculptural glass perfume bottle on pale limestone beside an open window. Sunlight refracts through the amber liquid into intricate caustics on the stone. A single white orchid curves behind the bottle; delicate condensation, realistic glass thickness and precise reflections. Warm morning light, soft shadows, subtle film grain, restrained luxury advertising composition. No lettering or logos.", "parameters": { "width": 1024, "height": 1024, "num_outputs": 1, "output_format": "png" } } } ``` ## Credit pricing 0.20 credits per image up to 4 megapixels. Each additional megapixel, rounded up, adds 0.05 credits per image. - 1024 × 1024 and 2048 × 1920 each cost 0.20 credits for one image. - 2048 × 2048 is just over 4 MP, so it costs 0.25 credits per image. Three images cost 0.75 credits. - The price uses the adjusted output size and number of images. Reference images, LoRAs and output format have no separate surcharge. - Credits are reserved before generation. Failed jobs refund the reserved charge. Pricing rules and exact billing details (credits): ```json { "version": "freja-h3-image-credits-v1", "combine": "sum", "minimum_credits": "0", "description": "0.20 credits per image up to 4 megapixels. Each additional megapixel, rounded up, adds 0.05 credits per image.", "notes": [ "1024 × 1024 and 2048 × 1920 each cost 0.20 credits for one image.", "2048 × 2048 is just over 4 MP, so it costs 0.25 credits per image. Three images cost 0.75 credits.", "The price uses the adjusted output size and number of images. Reference images, LoRAs and output format have no separate surcharge.", "Credits are reserved before generation. Failed jobs refund the reserved charge." ], "technical_notes": [ "Credits = ceil(max(4, adjusted_width × adjusted_height / 1,000,000)) × 0.05 × num_outputs, rounded upward once to six decimal places.", "Output dimensions round to the nearest multiple of 32, ties down. The worker uses a minimum internal canvas of 4 MP even for smaller requested outputs." ], "rules": [ { "id": "output-image-megapixels", "metric": "billing.output_megapixels", "unit_size": 1, "credits_per_unit": "0.05", "quantity_rounding": "ceil", "multiplier": { "path": "parameters.num_outputs", "minimum": 1, "divide_by": 1 }, "when": {}, "aggregation": "sum", "minimum_credits": "0", "rounding": { "mode": "ceil", "scope": "total", "increment": "0.000001" } } ] } ``` ## Limits and behavior - The fixed six-step sampler does not accept negative prompts, custom steps, guidance scale, masks, audio or video. - The prompt accepts up to 32,000 characters; the text encoder truncates beyond 4,096 tokens. - The worker accepts up to 16 references and 10 sequential outputs. Examples demonstrate two references and two outputs; higher counts and other combinations may vary. - LoRA download failures fail the job. Unsupported or incompatible adapters are skipped; inspect warnings in worker output. Public job responses currently contain result URL arrays. - Output files are temporary for 24 hours. Save results to assets to retain private copies.