Files
artcraft/app/pages/PageEnigma/notes/note_batch_media_endpoint.json
T
2024-03-24 22:56:44 -04:00

113 lines
4.6 KiB
JSON

https://api.fakeyou.com/v1/media_files/batch?tokens=m_jh74zz1nfj2jxrkw7n00yamt32zrhb&tokens=m_0rqwx4kbnn2gz5s37apzftkw25vkzb&tokens=m_je04hbk7bqjdq9cnegp1j10mf4dzdb
{
"success": true,
"media_files": [
{
"token": "m_0rqwx4kbnn2gz5s37apzftkw25vkzb",
"media_type": "video",
"media_class": "unknown",
"maybe_media_subtype": null,
"maybe_engine_extension": null,
"maybe_batch_token": null,
"public_bucket_path": "/media/c/0/n/g/p/c0ngp9c570w66q3vhs0ygmwpasf2sfk1/videoc0ngp9c570w66q3vhs0ygmwpasf2sfk1mp4",
"maybe_model_weight_info": null,
"maybe_creator_user": {
"user_token": "U:937C1VN0S5G8H",
"username": "echelon",
"display_name": "echelon",
"gravatar_hash": "37e7e18f19d8f654a1ace405c846a9de",
"default_avatar": {
"image_index": 10,
"color_index": 3
}
},
"creator_set_visibility": "private",
"maybe_text_transcript": null,
"maybe_prompt_token": "prompt_3sf5p1n7g3sna6pc44nqgpvyd",
"maybe_original_filename": null,
"is_emulated_media_file": false,
"stats": {
"positive_rating_count": 0,
"bookmark_count": 0
},
"created_at": "2024-03-25T02:25:18Z",
"updated_at": "2024-03-25T02:25:18Z"
},
{
"token": "m_je04hbk7bqjdq9cnegp1j10mf4dzdb",
"media_type": "video",
"media_class": "unknown",
"maybe_media_subtype": null,
"maybe_engine_extension": null,
"maybe_batch_token": null,
"public_bucket_path": "/media/d/a/3/b/6/da3b640rh3zjj1easv96vc4d7v4jq8c1/da3b640rh3zjj1easv96vc4d7v4jq8c1.mp4",
"maybe_model_weight_info": null,
"maybe_creator_user": {
"user_token": "U:937C1VN0S5G8H",
"username": "echelon",
"display_name": "echelon",
"gravatar_hash": "37e7e18f19d8f654a1ace405c846a9de",
"default_avatar": {
"image_index": 10,
"color_index": 3
}
},
"creator_set_visibility": "public",
"maybe_text_transcript": null,
"maybe_prompt_token": null,
"maybe_original_filename": null,
"is_emulated_media_file": false,
"stats": {
"positive_rating_count": 0,
"bookmark_count": 0
},
"created_at": "2024-03-25T02:04:22Z",
"updated_at": "2024-03-25T02:04:22Z"
},
{
"token": "m_jh74zz1nfj2jxrkw7n00yamt32zrhb",
"media_type": "video",
"media_class": "unknown",
"maybe_media_subtype": null,
"maybe_engine_extension": null,
"maybe_batch_token": null,
"public_bucket_path": "/media/a/c/s/z/e/acszeddd464edypg9hcp5cga0482sjfv/videoacszeddd464edypg9hcp5cga0482sjfvmp4",
"maybe_model_weight_info": null,
"maybe_creator_user": {
"user_token": "U:937C1VN0S5G8H",
"username": "echelon",
"display_name": "echelon",
"gravatar_hash": "37e7e18f19d8f654a1ace405c846a9de",
"default_avatar": {
"image_index": 10,
"color_index": 3
}
},
"creator_set_visibility": "private",
"maybe_text_transcript": null,
"maybe_prompt_token": "prompt_dc8x82w2gqsvbpmp5ksxypssj",
"maybe_original_filename": null,
"is_emulated_media_file": false,
"stats": {
"positive_rating_count": 0,
"bookmark_count": 0
},
"created_at": "2024-03-25T02:12:46Z",
"updated_at": "2024-03-25T02:12:46Z"
}
]
}
// lip sync will be generated through TTS
async get_media_url() {
//This is for prod when we have the proper info on the url.
let api_base_url = "https://api.fakeyou.com/";
let url = ${api_base_url}/v1/media_files/file/${this.media_id}
let responce = await fetch(url);
let json = await JSON.parse(await responce.text());
let bucketPath = json["media_file"]["public_bucket_path"];
let media_base_url = "https://storage.googleapis.com/vocodes-public"
let media_url = ${media_base_url}${bucketPath}
return media_url;
}
https://storage.googleapis.com/vocodes-public