DeGPT Model
API Readme
DeGPT Model
API Readme
API Readme
1. API price
There are two methods to obtain the API01
Token method
$0.05 per million input tokens, $0.15 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/proxyChat dialogue language model that uses text to generate text
Body request parameter
{
"model": "Qwen2.5-72B",
"messages": [
{
"role": "user",
"content": "Food Sharing"
}
],
"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": "Food sharing is a truly fascinating topic! Whether it's traditional delicacies or innovative dishes, they all allow people to experience different cultures and flavors. If there's a specific cuisine or food you'd particularly like to learn about, such as Sichuan cuisine, Cantonese cuisine, Italian food, Japanese cuisine, etc., or if you're interested in cooking methods for specific ingredients like seafood, vegetarian dishes, desserts, etc., feel free to let me know. I'll do my best to provide detailed information and share some delicious recipes. Which aspect of food would you most like to learn about?"
},
"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/proxyChat dialogue language model that uses text to generate text
Body request parameter
{
"model": "Qwen2.5-72B",
"messages": [
{
"role": "user",
"content": "Food Sharing"
}
],
"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