DINGJIAI
DINGJIAI
Quick start in 5 minutesWhat is DINGJIAI?

Online use

Online chatOpens in a new windowImage generationOpens in a new window

Popular Agents

Codex SetupClaude Code SetupOne-Click Setup

API Reference

API overview
ResponsesChat CompletionsAnthropic MessagesGemini API
Codex Search capabilityImages GenerationsImages EditsAnthropic Count Tokens
Error codes

Billing

Model pricingTroubleshooting calls
API families and API entriesAdditional entries and operations

Images Generations

The Images API Generations operation.

The Images API Generations operation

The Images API Generations operation uses /v1/images/generations, selects the model product and upstream from the matching call entry, and settles by the actual number of images returned successfully. It is not an alias for Chat Completions or Responses, and it is not a separate top-level protocol.

Paths

PurposeMethod and path
Image generationPOST /v1/images/generations

Request example

POST /v1/images/generations
curl https://dingjiai.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_USER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Public model id available for Images Generations",
    "prompt": "A glass-like blue mechanical bird on a white background",
    "size": "1024x1024",
    "n": 1
  }'

Request fields

Prop

Type

n is the platform-level quantity limit

n must be an integer from 1 to 4. Passing n<1, n>4, or a non-integer returns invalid_image_count without calling the upstream or charging the user. Other image parameters, such as a missing prompt, an unsupported size, or a parameter unsupported by the model, still produce an upstream error.

Model selection

There is currently no public, dedicated model list for Images Generations. When integrating, use a public model id explicitly opened by the console or administrator under the openai_images_generations internal call entry.

Model products are isolated by call entry

GET /v1/models returns only model products published for the OpenAI Chat Completions call entry; it does not prove that the Images Generations operation is available. Image models must be opened separately under the openai_images_generations internal call entry.

Response and billing

For n=1, the gateway returns one upstream response and delivers at most one image. For n=2..4, the gateway sends multiple single-image requests to the upstream, runs at most 2 subrequests concurrently, and aggregates successful responses into one OpenAI-compatible response. Each subrequest consumes a real upstream concurrency slot; when an upstream concurrency limit or the total fanout timeout is reached, unsuccessful subrequests are treated as partial failures.

When settling successfully, DINGJIAI reads the actual number of images returned in the final response body's data array. Each item with url or b64_json counts as one image.

Prop

Type

The response determines the image count

n is the maximum number of images the request attempts to generate. The gateway returns and charges for the number of successful images. If none succeed, the entire request fails without writing a usage log or charging the user.

Last updated on

Codex Search capabilityImages Edits

On this page

PathsRequest exampleRequest fieldsModel selectionResponse and billing