cURL
curl --request POST \ --url https://api.memories.ai/serve/api/v1/marketer_chat \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "prompt": "What does nike recently post?", "session_id": "", "unique_id": "default", "type": "TIKTOK" } '
{ "code": "0000", "msg": "success", "data": {}, "success": true, "failed": false }
QA your videos.
Documentation IndexFetch the complete documentation index at: https://api-tools.memories.ai/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
Use this file to discover all available pages before exploring further.
/serve/api/v1/marketer_chat
/serve/api/v1/marketer_chat_stream
import requests import json headers = { "Authorization": "<API_KEY>", "Content-Type": "application/json",} payload = { "prompt": "What does nike recently post?", # User query "session_id": "", # Chat session ID "unique_id": '1' # unique id for user/workspace/namespace management } response = requests.post( "https://api.memories.ai/serve/api/v1/marketer_chat", headers=headers, json=payload, stream=False ) print(response.status_code) print(response.json())
import requests import json headers = { "Authorization": "<API_KEY>", "Content-Type": "application/json", "Accept": "text/event-stream"} payload = { "prompt": "What does nike recently post?", # User query "session_id": "", # Chat session ID, Optional "unique_id": '<UNIQUE_ID>', # Optional "type": "TIKTOK", # 'TIKTOK' by default } response = requests.post( "https://api.memories.ai/serve/api/v1/marketer_chat_stream", headers=headers, json=payload, stream=True ) # ... helper code to parse SSE ...
{ "prompt": "What does nike recently post?", "session_id": "", "unique_id": "default", "type": "TIKTOK", }
TIKTOK
YOUTUBE
INSTAGRAM
{ "code": "0000", "msg": "success", "data": { "role": "ASSISTANT", "content": "Opening scene: a quiet, tactile tease...", "thinkings": [ ... ] } }
"What does nike recently post?"
""
Successful response
"0000"
"success"
true
false