Get Agent Conversation Point Consumption List

Get Agent Conversation Point Consumption List

You can use this interface to obtain the details of point consumption by a specified Agent within a time range, aggregated by conversationId, returning data for up to 30 days.

Request Method

GET

Request URL

https://api.gptbots.ai/v1/account/agent/conversation/credits

Authentication

For details, refer to the authentication instructions in API Overview.

Request Frequency

This interface counts towards the per-minute quota of the organization's plan under "Statistics API" and shares the quota with other statistics interfaces (including organization-level statistics interfaces). If exceeded, 40008 will be returned.

Request

Request Example

curl -X GET 'https://api.gptbots.ai/v1/account/agent/conversation/credits?start_time=1774837924000&end_time=1775183447000&page=1&page_size=20' \ -H 'Authorization: Bearer your_apikey'
                      
                      curl -X GET 'https://api.gptbots.ai/v1/account/agent/conversation/credits?start_time=1774837924000&end_time=1775183447000&page=1&page_size=20' \
  -H 'Authorization: Bearer your_apikey'

                    
This code block in the floating window

Request Headers

Field Type Description
Authorization Bearer ${token} Use Authorization: Bearer ${token} for call authentication. Please obtain the key as the token on the API key page.

Request Parameters

Field Type Required Description
start_time long Yes Query start time, in milliseconds timestamp.
end_time long Yes Query end time, in milliseconds timestamp. The interval between start_time and end_time cannot exceed 30 days.
page int No Page number, default is 1.
page_size int No Number of items per page, default is 20, maximum is 100.
conversation_id string No Conversation ID.

Response

Response Example

{ "list": [ { "conversation_id": "6830a1f2e4b0f1a2b3c4d5e6", "conversation_create_time": 1774838000000, "chat": 1.50, "anonymization": 0, "asr": 0, "tts": 0, "rerank": 0.30, "database_processing": 0, "tool_call": 0.20, "knowledge_doc_indexing": 0, "question_tag": 0, "moderation": 0.01, "total": 2.0 } ], "total": 1, "page": 1, "page_size": 20, "start_time": 1774837924000, "end_time": 1775183447000 }
                      
                      {
    "list": [
        {
            "conversation_id": "6830a1f2e4b0f1a2b3c4d5e6",
            "conversation_create_time": 1774838000000,
            "chat": 1.50,
            "anonymization": 0,
            "asr": 0,
            "tts": 0,
            "rerank": 0.30,
            "database_processing": 0,
            "tool_call": 0.20,
            "knowledge_doc_indexing": 0,
            "question_tag": 0,
            "moderation": 0.01,
            "total": 2.0
        }
    ],
    "total": 1,
    "page": 1,
    "page_size": 20,
    "start_time": 1774837924000,
    "end_time": 1775183447000
}

                    
This code block in the floating window

Successful Response

Field Type Description
list list List of point consumption details.
conversation_id string Conversation ID.
conversation_create_time long Conversation creation time (timestamp in milliseconds), null if the conversation record has been deleted.
chat decimal Credits consumed for conversation (LLM chat).
anonymization decimal Credits consumed for anonymization.
asr decimal Credits consumed for Automatic Speech Recognition (ASR).
tts decimal Credits consumed for Text-to-Speech (TTS).
rerank decimal Credits consumed for vector re-ranking.
database_processing decimal Credits consumed for database processing.
tool_call decimal Credits consumed for tool calls.
knowledge_doc_indexing decimal Credits consumed for knowledge base indexing.
question_tag decimal Credits consumed for question tagging.
moderation decimal Credits consumed for content moderation.
total decimal Total credits consumed for this conversation.
total long Total number of conversations that meet the criteria (for pagination).
page int Current page number.
page_size int Number of items per page.
start_time long Query start time.
end_time long Query end time.

Failed Response

Field Type Description
code int Error code.
message string Error description information.

Error Codes

Code Message
40000 Parameter error
40001 Invalid time range (exceeds 30 days)
50000 Internal system error