1. 原生OpenAI格式
DMC GATEWAY DOCS
  • 欢迎使用
  • 一、快速入门DMC
    • 注册与登录
    • 令牌管理
    • 个人设置
    • 定价
    • 如何充值
  • 二、开发者代码接入
    • 原生OpenAI格式
      • ChatCompletions格式
        POST
      • Responses格式
        POST
    • 原生Claude格式
      POST
  • 三、常用客户端配置
    • Opencode配置文档
    • OpenAI Codex 安装配置教程
    • AnythingLLM 配置教程
    • Claude Code 配置教程
    • TypingMind 配置教程
    • n8n 配置教程
    • OpenClaw安装配置教程
    • Hermes Agent安装配置教程
  • 四、常见问题排错
    • 常见误解
    • 使用常见问题
  1. 原生OpenAI格式

Responses格式

开发中
POST
https://dmc.cc/v1/chat/completions
OpenAI Responses API,用于创建模型响应。 支持多轮对话、工具调用、推理等功能。

请求参数

Header 参数

Body 参数application/json必填

示例
{"model":"Doubao-Seed-2.0-mini","messages":[{"role":"user","content":"Say hello in one sentence."}]}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://dmc.cc/v1/chat/completions' \
--header 'Authorization: Bearer sk-nnd8Z5vv9iEn8e1GI0lOqEHOQ40sIQlIiN40siwCFO80IZcT' \
--header 'Content-Type: application/json' \
--data '{"model":"Doubao-Seed-2.0-mini","messages":[{"role":"user","content":"Say hello in one sentence."}]}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{"choices":[{"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"Hello! It’s a pleasure to connect with you, and I’m here to help with whatever you need today.","reasoning_content":"Okay, the user wants a hello in one sentence. Let's make it natural and friendly. Maybe \"Hello! It’s great to connect with you—how can I assist you today?\" Wait, does that count? Let me check. It's one sentence, says hello, warm. Yeah, that works. Wait, or is it too long? No, the request is just to say hello in one sentence. Let's go with something sincere. Maybe: \"Hello! It’s a pleasure to meet you, and I’m here to help with whatever you need.\" Perfect, that's a single sentence, includes hello, friendly, fits.","role":"assistant"}}],"created":1778682958,"id":"0217786829546464b73f3a7fd65ebccde087806b0ec2539d425e6","model":"doubao-seed-2-0-mini-260428","service_tier":"default","object":"chat.completion","usage":{"completion_tokens":154,"prompt_tokens":39,"total_tokens":193,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":131}}}
修改于 2026-05-13 14:37:28
上一页
ChatCompletions格式
下一页
原生Claude格式
Built with