PhoenixLLM
Buy LLM Token
POST
https://www.phoenix.global/sdk/computation/LLM/buyLLMToken
Headers
token*
string
The token generated in the previous step
Request Body
tokensNum*
integer
The number of tokens to be purchased
jobName*
string
Job name
{
"code": 200,
"msg": "success",
"jobID": "15336929879565052031766977071313450079096374296015479727460579121350576553341"
}
The usage of curl and golang sdk is as follows:
curl --location 'https://www.phoenix.global/sdk/computation/LLM/buyLLMToken' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2NzgyNzM4Mjh9.7Qy6jh5L1qvVVbOZYR3JrmWdothI2SCF-oGyC2BfZDs' \
--header 'Content-Type: application/json' \
--data '{
"tokensNum": 1000,
"jobName": "LLM job"
}'
Query Token price
GET
https://www.phoenix.global/sdk/computation/LLM/queryLLMPrice
Querying the price of LLM token, priced in ccd
Headers
token*
string
The token generated in the previous step
{
"code": 200,
"data": {
"price": "0.000007142857"
},
"msg": "success"
}
The usage of curl and golang sdk is as follows:
curl --location 'https://www.phoenix.global/sdk/computation/LLM/queryLLMPrice' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2NzgyNzM4Mjh9.7Qy6jh5L1qvVVbOZYR3JrmWdothI2SCF-oGyC2BfZDs'
Default LLM
POST
https://www.phoenix.global/sdk/computation/LLM/callLLM3
Headers
token*
string
The token generated in the previous step
Request Body
prompt*
string
Prompt
max_new_tokens
int
The maximum number of tokens that can be consumed by this call
Response
{
"code": 200,
"msg": "success",
"text": "Blockchain is a distributed digital ledger technology...",
"tokens_balance": 1534425
}
The usage of curl and golang sdk is as follows:
curl --location 'https://www.phoenix.global/sdk/computation/LLM/callLLM3' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2NzgyNzM4Mjh9.7Qy6jh5L1qvVVbOZYR3JrmWdothI2SCF-oGyC2BfZDs' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "what is blockchain"
}'
Coding LLM
POST
https://www.phoenix.global/sdk/computation/LLM/verticalLLM
Headers
token*
string
The token generated in the previous step
Request Body
prompt*
string
Prompt
max_new_tokens
int
The maximum number of tokens that can be consumed by this call
Response
{
"code": 200,
"msg": "success",
"text": "Certainly! Below is an example of a simple Solidity smart contract that creates a basic token...",
"tokens_balance": 1534425
}
The usage of curl and golang sdk is as follows:
curl --location 'https://www.phoenix.global/sdk/computation/LLM/verticalLLM' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2NzgyNzM4Mjh9.7Qy6jh5L1qvVVbOZYR3JrmWdothI2SCF-oGyC2BfZDs' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Write a simple solidity contract"
}'
Last updated