DINGJIAI
DINGJIAI
Quick start in 5 minutesWhat is DINGJIAI?

Popular Agents

Codex SetupClaude Code SetupOne-Click Setup

API Reference

Base URL and authentication

Billing

Model pricingOpens in a new window
Request basics

Base URL and authentication

Base URLs, user API Keys, and authentication methods.

Every public protocol 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.

ProtocolCommon 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 model listhttps://dingjiai.com/v1GET /v1/models; compatible with GET /models
Anthropic Messageshttps://dingjiai.comPOST /v1/messages or POST /anthropic/v1/messages
Anthropic model listhttps://dingjiai.comGET /anthropic/v1/models
Gemini GenerateContenthttps://dingjiai.comPOST /v1beta/models/{model}:generateContent
Gemini streamGenerateContenthttps://dingjiai.comPOST /v1beta/models/{model}:streamGenerateContent
Gemini model listhttps://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 Generationshttps://dingjiai.com/v1POST /v1/images/generationsCharged by the number of images actually returned
Anthropic Count Tokenshttps://dingjiai.comPOST /v1/messages/count_tokens or POST /anthropic/v1/messages/count_tokensMessages sub-endpoint; 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

One-Click SetupChat Completions

On this page

Choose the Base URLAdditional endpointsAuthenticationAuthentication boundaries