Aller au contenu principal

Interaction History

Retrieve the last AI interaction for a given user and service type.

Endpoint​

GET https://api.yodi.tg/v1/ai/interaction/last/{service}

Parameters​

ParameterTypeDescription
userIdpathUser ID
servicepathModule the interaction belongs to: translate, speak or transcribe

Example Request​

curl -X GET "https://api.yodi.tg/v1/ai/interaction/last/speak" \
-H "Authorization: Bearer YOUR_API_KEY"

Example Response​

{
"message": "SUCCESS",
"error": false,
"data": {
"id": 128,
"userId": 42,
"service": "speak",
"inputData": {
"input": "Hello world"
},
"outputData": {
"audioUrl": "https://cdn.yodi.tg/audio/abc123.wav",
"time": 3.2
}
},
"status": 200
}

Next Steps​