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
Base URL and authenticationHeadersModel lists and model selection
Error codes

Billing

Model pricingTroubleshooting calls
Request basics

Base URL and authentication

Base URLs, user API Keys, and authentication methods.

Every public API entry uses a DINGJIAI user API Key

Clients only need a user API Key. Upstream provider keys are used by DINGJIAI during server-side forwarding and must never appear in client configuration, curl examples, or public documentation.

Choose the Base URL

Clients append paths differently. If a tool automatically adds /v1/chat/completions, /v1/responses, or /v1/messages, enter the Base URL it expects. For direct HTTP requests, use the public paths below.

API family / API entryCommon Base URLPublic path
OpenAI Chat Completionshttps://dingjiai.com/v1POST /v1/chat/completions; compatible with POST /chat/completions
OpenAI Responseshttps://dingjiai.com/v1POST /v1/responses
OpenAI Chat Completions · model listinghttps://dingjiai.com/v1GET /v1/models; compatible with GET /models
Anthropic Messageshttps://dingjiai.comPOST /v1/messages or POST /anthropic/v1/messages
Anthropic Messages · model listinghttps://dingjiai.comGET /anthropic/v1/models
Gemini GenerateContenthttps://dingjiai.comPOST /v1beta/models/{model}:generateContent
Gemini streamGenerateContenthttps://dingjiai.comPOST /v1beta/models/{model}:streamGenerateContent
Gemini · model listinghttps://dingjiai.comGET /v1beta/models

The public paths accept both trailing-slash and non-trailing-slash forms. Documentation examples use the non-trailing-slash form consistently.

Additional endpoints

EndpointCommon Base URLPathNotes
OpenAI Images · Generations operationhttps://dingjiai.com/v1POST /v1/images/generationsCharged by the number of images actually returned
OpenAI Responses · Codex Search capabilityhttps://dingjiai.com/v1POST /v1/alpha/searchA Responses capability transport entry used automatically by Codex; no separate billing; manual calls are not recommended
Anthropic Messages · Count Tokens operationhttps://dingjiai.comPOST /v1/messages/count_tokens or POST /anthropic/v1/messages/count_tokensA specific Messages operation; does not create a billing settlement
Images EditsNot a public API Base URLPOST /api/img/editsPrivate signed-in web endpoint; /v1/images/edits is not public

Authentication

OpenAI-compatible endpoints use Bearer authentication.

-H "Authorization: Bearer YOUR_USER_API_KEY"

Anthropic endpoints use x-api-key.

-H "x-api-key: YOUR_USER_API_KEY"

Gemini-native endpoints should use x-goog-api-key.

-H "x-goog-api-key: YOUR_USER_API_KEY"

Authentication boundaries

Prop

Type

Last updated on

API overviewHeaders

On this page

Choose the Base URLAdditional endpointsAuthenticationAuthentication boundaries