Skip to content

通话详情

接口信息

  • 接口: /agent-api/user/{id}/task/{task_id}/detail/{record_id}
  • 请求方式: GET

请求说明

注意

  • 原请求地址为GET /agent-api/task/{task_id}/detail/{record_id},新增参数用户id,且为必填
  • 如果仍使用老版本的接口,将使用系统默认的云节点ID,无法操作其他云节点的数据
  • 通话详情机器人|客户单句录音已兼容2.0常规话术跟大模型话术,需要注意响应结果格式会有区别,具体看示例

路由参数

参数类型必填描述
idstringY账号 ID
task_idstringY任务 ID
record_idstringY通话记录 ID

请求参数 (new)

参数类型必填描述
sub_user_idstringN子账户 id(传递此参数则是对子账户操作)

请求示例

cURL
curl -X GET "https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR_TOKEN")

    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
JavaScript
const axios = require('axios');

const response = await axios.get(
  'https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885',
  {
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  }
);

console.log(response.data);
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885"))
            .header("Content-Type", "application/json")
            .header("Authorization", "Bearer YOUR_TOKEN")
            .GET()
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_TOKEN'
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
Python
import requests

url = 'https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885'
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN'
}

response = requests.get(url, headers=headers)
print(response.json())
C++
#include <iostream>
#include <curl/curl.h>

size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp) {
    ((std::string*)userp)->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl;
    CURLcode res;
    std::string readBuffer;

    curl = curl_easy_init();
    if(curl) {
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Content-Type: application/json");
        headers = curl_slist_append(headers, "Authorization: Bearer YOUR_TOKEN");

        curl_easy_setopt(curl, CURLOPT_URL, "https://ai.api.longlonglong.cn/agent-api/user/4d99d91c-f5d9-49da-88da-758977cc58a9/task/287e19c4-1966-49d6-8f02-b53ef11c0a55/detail/50971322-2e84-4701-836c-fd1181306885");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);

        res = curl_easy_perform(curl);
        if(res != CURLE_OK)
            fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
        else
            std::cout << readBuffer << std::endl;

        curl_easy_cleanup(curl);
    }
    return 0;
}

成功响应

条件:任务存在、账号存在、通话记录存在。

状态码:200 OK

1.0常规话术通话记录详情

json
{
    "code": 200,
    "status": "success",
    "message": "查看通话记录详情成功",
    "data": {
        "records": [
            {
                "id": "f3f1be7d-0207-470f-89fb-f9dea6261a29",
                "record_id": "9b006ce6-8da9-4d9a-ac21-11d69d54ea07",
                "task_id": "61838fa8-3d09-4835-9862-e0a3b7804758",
                "notify": "enter",
                "callid": "9b006ce6-8da9-4d9a-ac21-11d69d54ea07",
                "error_code": 0,
                "asrtype": null,
                "callee": "16321211120",
                "gender": null,
                "asr_elapse": null,
                "record_ms": null,
                "volume_gain": null,
                "question": "",
                "split_question": null,
                "question_index": 0,
                "speak_ms": 0,
                "play_ms": 0,
                "keyword": null,
                "answer_id": "dd09f136-b78f-4b98-b89f-3d79db271714",
                "answer_text": "流程1:开场白",
                "answer_content": "喂,您好...",
                "word_class": "16",
                "answer_action": null,
                "playback_after_action": 0,
                "upstream_answer_action": null,
                "upstream_answer_content": null,
                "upstream_answer_text": null,
                "upstream_answer_id": null,
                "score": 0,
                "sequence": 1,
                "created_at": "2025-09-08 11:02:06",
                "updated_at": null,
                "bridge_status": null,
                "user_id": "79449645-b210-4b45-b34d-970dfb8272ba",
                "is_regular": false,
                "expression": null,
                "extra": [],
                "contents": [
                    {
                        "id": "9e7d1637-a9ca-4202-9f1b-69ceeac6b666",
                        "file_id": "c6f8e9c1-c89e-4b60-94f4-cda678b8c406",
                        "sort": 0,
                        "status": true,
                        "translate_text": "喂,您好..."
                    }
                ],
                "tags": [],
                "outbound_collection_record": null,
                "download_voice": [
                    ["https://ai.call.longlonglong.cn/api/agent-api/download-voice?key=..."]
                ],
                "voice": ""
            }
        ]
    }
}

字段说明

字段说明
id详情记录ID
record_id通话记录ID
task_id任务ID
notify通知类型
callid通话ID
error_code错误码
asrtypeASR类型
callee被叫号码
gender性别
question客户说的话
answer_text机器人回复文本
answer_content机器人回复内容
sequence对话序号
download_voice语音下载地址

基于 MIT 许可发布