DeGPT Model
API Readme

1. API price

There are two methods to obtain the API

01

Token method

$1 per million input tokens, $3 per million output tokens;

02

VIP user method

$3 per month, with 1,000 conversations per day.

2. POST AI items list

POST /api/v0/ai/projects/list
Response  eg
{
"code": 0,
    "message": "ok",
    "data": [
        "SuperImageAI",
        "DecentralGPT"
    ]
}
Response result
Code
Code content
Explanation
Data
200
OK
none
Inline
Response data structure (Code: 200)
Name
Type
Is_ required
Restrict
Chinese name
Explanation
» code
integer
true
none
none
» message
string
true
none
none
» data
[string]
true
none
none

3. POST AI items model list

POST /api/v0/ai/projects/models
Request parameter
{
"project": "DecentralGPT"
}
Request parameter
Name
Framework
Type
Is_ required
Explanation
» project
body
string
yes
none
Request parameter
{
"code": 0,
    "message": "ok",
    "data": [
        "Qwen2.5-72B",
        "NVLM-D-72B",
        "Codestral-22B-v0.1",
        "Qwen2-72B",
        "Gemma-2-27B",
        "Llama-3.1-Nemotron-70B",
        "DeepSeek-Coder-V2",
        "Llama-3.1-405B",
        "Llama3-70B"
    ]
}
Response result
Code
Code content
Explanation
Data
200
OK
none
Inline
Response data structure (Code: 200)
Name
Type
Is_ required
Restrict
Chinese name
Explanation
» code
integer
true
none
none
» message
string
true
none
none
» data
[string]
true
none
none

4. POST AIGC ( Text-to-Text Non-streaming requests )

POST /api/v0/chat/completion/proxy
Chat dialogue language model that uses text to generate text
Body request parameter
{
"model": "Qwen2.5-72B",
    "messages": [
        {
            "role": "user",
            "content": "美食分享"
        }
    ],
    "project": "DecentralGPT",
    "stream": false
}
Request parameter
Name
Framework
Type
Is_ required
Explanation
» project
body
string
yes
none
» model
body
string
yes
none
» messages
body
[object]
yes
none
» stream
body
boolean
yes
Streaming & non-streaming
Response eg
{
"code": 0,
    "message": "",
    "data": {
        "created": 1730791694,
        "choices": [
            {
                "index": 0,
                "message": {
                    "role": "assistant",
                    "content": "美食分享是一个非常有趣的话题!无论是传统佳肴还是创新料理,都能让人感受到不同的文化和风味。如果你有特别想了解的菜系或美食,比如川菜、粤菜、意大利菜、日式料理等,或者对特定食材的料理方法感兴趣,比如海鲜、素食、甜点等,都可以告诉我,我会尽量提供详细的信息和分享一些美味的食谱。你最想了解哪方面的美食呢?"
                },
                "finish_reason": "stop"
            }
        ],
        "usage": {
            "completion_tokens": 92,
            "prompt_tokens": 31,
            "total_tokens": 123
        }
    }
}
Response result
Code
Code content
Explanation
Data
200
OK
none
Inline
Response data structure (Code: 200)
Name
Type
Is_ required
Restrict
Chinese name
Explanation
» code
integer
true
none
none
» message
string
true
none
none
» data
object
true
none
none
»» created
integer
true
none
none
»» choices
[object]
true
none
none
»»» index
integer
true
none
none
»»» message
object
true
none
none
»»»» role
string
true
none
none
»»»» content
string
true
none
none
»»» finish_reason
string
true
none
none
»» usage
object
true
none
none
»»» completion_tokens
integer
true
none
none
»»» prompt_tokens
integer
true
none
none
»»» total_tokens
integer
true
none
none

5. POST AIGC ( Text-to-Text Streaming requests )

POST /api/v0/chat/completion/proxy
Chat dialogue language model that uses text to generate text
Body request parameter
{
"model": "Qwen2.5-72B",
    "messages": [
        {
            "role": "user",
            "content": "美食分享"
        }
    ],
    "project": "DecentralGPT",
    "stream": false
}
Request parameter
Name
Framework
Type
Is_ required
Explanation
» project
body
string
yes
none
» model
body
string
yes
none
» messages
body
[object]
yes
none
»» role
body
string
yes
none
»» content
body
string
yes
none
» stream
body
boolean
yes
none
Response eg
#流式数据内容
data:{
    "id": "chat-61a10d5b72f647fabe10ec3eea19f327",
    "object": "chat.completion.chunk",
    "created": 1730792163,
    "model": "Qwen2.5-72B",
    "choices": [
        {
            "index": 0,
            "delta": {
                "role": "assistant",
                "content": ""
            },
            "logprobs": null,
            "finish_reason": null
        }
    ]
}
#流式数据结束标志
data:[DONE]
Response result
Code
Code content
Explanation
Data
200
OK
none
Inline
Response data structure (Code: 200)
Name
Type
Is_ required
Restrict
Chinese name
Explanation
» data
object
true
none
none
»» id
string
true
none
none
»» object
string
true
none
none
»» created
integer
false
none
none
»» nodel
string
false
none
none
»» choices
object
true
none
none
»»» index
integer
true
none
none
»»» delta
object
false
none
none
»»»» role
string
true
none
none
»»»» content
string
true
none
none
»»» logprobs
integer
true
none
none
»»» finish_reason
integer
true
none
none

6. POST running specified AI projects and models Node list

POST /api/v0/ai/projects/peers
Request parameter
{
"project": "DecentralGPT", 
"model": "Qwen2.5-72B"
}
Request parameter
Name
Framework
Type
Is_ required
Explanation
number
query
integer
yes
Maximum number of nodes
body
body
object
no
none
» project
body
string
yes
none
» model
body
string
yes
none
Response eg
{
"code": 0,
    "message": "ok",
    "data": [
        {
            "node_id": "16Uiu2HAmAZmg7WcW8jK6mkjFx6HBbc1HtPWFk88cjjDyvf6MYw8D",
            "connectivity": 1,
            "latency": 148649
        }
    ]
}
Response result
Code
Code content
Explanation
Data
200
OK
none
Inline
Response data structure (Code: 200)
Name
Type
Is_ required
Restrict
Chinese name
Explanation
» code
integer
true
none
none
» message
string
true
none
none
» data
[object]
true
none
none
»» node_id
string
true
none
none
»» connectivity
integer
true
none
none
»» latency
integer
true
none
none

7. API node selection

USA
https://usa-chat.degpt.ai
Singapore
https://singapore-chat.degpt.ai
korea
https://korea-chat.degpt.ai