Jimeng Image Generation: Text & Image to Image API
Generate and edit images with Jimeng (即梦) models through Fhddos’s OpenAI-compatible image API. Supports text-to-image and image-to-image workflows.
Jimeng (即梦) is a series of high-quality image generation models available through Fhddos. Jimeng models are fully compatible with the OpenAI image API, so you can integrate them using any OpenAI SDK or standard HTTP client without changing your existing image-generation code. Point your client at https://aiapi.fhddos.com, set your Fhddos token, and start generating.
from openai import OpenAIclient = OpenAI( api_key="YOUR_API_KEY", base_url="https://aiapi.fhddos.com/v1")response = client.images.generate( model="jimeng-4.0", prompt="A cute panda reading in a library", size="1024x1024")print(response.data[0].url)
from openai import OpenAIclient = OpenAI( api_key="YOUR_API_KEY", base_url="https://aiapi.fhddos.com/v1")prompts = [ "A panda reading in a library", "A panda strolling in a park", "A panda resting in a bamboo grove"]for prompt in prompts: response = client.images.generate( model="jimeng-3.0", prompt=prompt, n=1 ) print(f"{prompt}: {response.data[0].url}")
Best for: commercial design, high-quality posters, detailed creative work.Highest output quality with the richest detail.
jimeng-3.0
Best for: rapid prototyping, batch generation, cost-sensitive workflows.Faster generation speed at a lower cost per image.
jimeng-agent
Best for: iterative, multi-turn creative sessions where context from earlier turns informs each new image.Intelligently incorporates conversation history.
Use the size parameter on POST /v1/images/generations to control output dimensions. Common values:
Size
Aspect ratio
Typical use
1024x1024
1:1 (square)
Profile images, product shots
1792x1024
16:9 (landscape)
Banners, wallpapers, cinematic
1024x1792
9:16 (portrait)
Mobile wallpapers, story cards
The n parameter specifies how many images you request, but Jimeng models always generate 4 images per billable call. Set n=4 to retrieve all generated variants, or n=1 to receive a single URL from the batch.