Discussions
How many actors are there in d-id, Im trying to get the list of all available actors.
almost 2 years ago by anand.srikumar007
Hi Team,
Im trying to get the list of all available actors, when I don't use limit query parameter, i'm getting only 1 actor, when I use limit=100, i get 3 actors.
url = "https://api.d-id.com/clips/actors"
headers = {
"accept": "application/json",
"content-type": "application/json",
"Authorization":"Basic xxxxxxxx:xxxxxxxxx"
}
body = json.dumps({"limit":10})
create_stream_response = requests.get(url, headers=headers, data=body)
res_j = json.loads(create_stream_response.text)
print(res_j)
"""
response below
{'actors': [{'id': 'amy', 'created_at': '2022-10-23T15:55:15.087Z',
'thumbnail_url': 'https://clips-presenters.d-id.com/amy/thumbnail.png',
'image_url': 'https://clips-presenters.d-id.com/amy/image.png',
'gender': 'female', 'modified_at': '2022-10-23T15:55:15.087Z'},
{'id': 'daniel', 'created_at': '2022-10-23T15:55:15.087Z',
'thumbnail_url': 'https://clips-presenters.d-id.com/daniel/thumbnail.png',
'image_url': 'https://clips-presenters.d-id.com/daniel/image.png',
'gender': 'male', 'modified_at': '2022-10-23T15:55:15.087Z'},
{'id': 'matt', 'created_at': '2022-10-23T15:55:15.087Z',
'thumbnail_url': 'https://clips-presenters.d-id.com/matt/thumbnail.png',
'image_url': 'https://clips-presenters.d-id.com/matt/image.png',
'gender': 'male', 'modified_at': '2022-10-23T15:55:15.087Z'}]}
"""
The above code gives 3 actors as the response. If I don't use body, I give limit=10 in the url itself then I'm getting only 1 actor along with a token.