Muse.ai Api Key Breakdown For Python

API Flow
APIs that may require long-running jobs return a Job ID once a request is made. Using this Job ID you can retrieve the state of this job, and once it is complete (i.e. status: done), results can be fetched. The results are accessible for 1 hour after job completion.

  1. Making an API Call
    Request example
    import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.wav’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/speech’, headers=headers, files=files)
Response example
{
“id”: “72787541f3fc8170207ea446a22f60ce4130d950cbebcc058dd53bd321419beb”
}

  1. Fetching results
    Request example
    import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://api.muse.ai/speech/72787541f3fc8170207ea446a22f60ce4130d950cbebcc058dd53bd321419beb’, headers=headers)
Response example (pending)
{
“status”: “pending”
}
Response example (done)
{
“status”: “done”,
“transcript”: “we choose to go to the moon in this decade”
}

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

Errors
Our APIs return a subset of basic HTTP response status codes. Additionally, the response body may include a JSON entry with a brief status string providing more details.

Status codes
200
OK
Everything went as expected.

400
Bad request
The request was not acceptable, often due to a missing parameter.

401
Unauthorized
No valid API key provided.

402
Payment required
Not enough credits.

404
Not found
The requested resource does not exist.

429
Too many requests
Threshold limit has been reached.

500
Server error
Something went wrong on our end.

Example error
{
“error”: “file_not_provided”
}

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

Authentication
In order to make requests to muse.ai APIs, you will need to use an authentication key. You can obtain a key in two ways: by using the Settings window in muse.ai application, or by making an authentication request using the API.

Using a key
To make requests to muse.ai APIs, pass the key using the Key header.

Creating a key
To create a key, make one of the following requests:

Using a password
Request example
import requests

headers = {
# Already added when you pass json=
# ‘Content-Type’: ‘application/json’,
}

json_data = {
’email’: ‘your-email@example.com’,
‘passwd’: ‘your-password’,
}

response = requests.post(‘https://muse.ai/api/auth/login’, headers=headers, json=json_data)
Show request parameter details
Response example
{
“key”: “2tHIVrn7GIghYCzVCvpgtf295d1e32d5”
}
Show response parameter details
Using a key
Request example
import requests

headers = {
‘Content-Type’: ‘application/json’,
‘Key’: ‘YOUR_KEY’,
}

response = requests.post(‘https://muse.ai/api/auth/keys’, headers=headers)
Response example
{
“key”: “2tHIVrn7GIghYCzVCvpgtf295d1e32d5”
}
Hide response parameter details
Response body
key

string
Authentication key.

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

Videos
Store and retrieve videos.

Upload
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘The_Solar_System.mp4’, ‘rb’),
}

response = requests.post(‘https://muse.ai/api/files/upload’, headers=headers, files=files)
Show request parameter details
Response example
{
“fid”: “b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157”,
“svid”: “8KsbyKv”,
“filename”: “The_Solar_System.mp4”,
“title”: “The Solar System”,
“description”: “”,
“url”: “https://cdn.muse.ai/w/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/data”,
“duration”: 426.84,
“width”: 1280,
“height”: 720,
“size”:251126000,
“tcreated”: 1559655942,
“visibility”: “public”,
“ingesting”: false
}
Show response parameter details
Cut a clip
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘svid’: (None, ‘8KsbyKv’),
‘start’: (None, ’10’),
‘end’: (None, ’25’),
}

response = requests.post(‘https://muse.ai/api/files/cut’, headers=headers, files=files)
Show request parameter details
Response example
{
“svid”: “QB7jXla”,
“filename”: “The_Solar_System.mp4”,
“title”: “The Solar System”,
“description”: “”,
“duration”: 15.0,
“width”: 1280,
“height”: 720,
“size”: 538526,
“tcreated”: 1559656221,
“visibility”: “public”,
“ingesting”: true,
“cut_svid”, “8KsbyKv”,
“cut_start”, 10.0,
“cut_end”: 25.0
}
Show response parameter details
Update a video
Request example
import requests

  headers = {
      'Key': 'YOUR_KEY',
      # Already added when you pass json=
      # 'Content-Type': 'application/json',
  }

  json_data = {
      'title': 'New Video Name',
      'visibility': 'public',
  }

  response = requests.post('https://muse.ai/api/files/set/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157', headers=headers, json=json_data)

Hide request parameter details
Request bodyapplication/json
title

string
Video title.

description

string
Video description.

visibility

string
Video visibility. One of “private”, “unlisted”, or “public”.

domains

list
A list of domains (strings) video embedding is limited to.

Delete a video
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.delete(‘https://muse.ai/api/files/delete/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157’, headers=headers)
List videos
Request example
curl -H “Key: YOUR_KEY” \
https://muse.ai/api/files/videos
Response example
[
{
“fid”: “b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157”,
“svid”: “8KsbyKv”,
“filename”: “The_Solar_System.mp4”,
“title”: “The Solar System”,
“description”: “”,
“url”: “https://cdn.muse.ai/w/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/data”,
“duration”: 426.84,
“width”: 1280,
“height”: 720,
“size”:251126000,
“tcreated”: 1559655942,
“visibility”: “public”,
“ingesting”: false,
“mature”: false,
“own”: true,
“views”: 9716,
“twatched”: 3824799,
}
]
Show response parameter details
Get a video
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://muse.ai/api/files/videos/8KsbyKv’, headers=headers)
Response example
{
“fid”: “b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157”,
“svid”: “8KsbyKv”,
“filename”: “The_Solar_System.mp4”,
“title”: “The Solar System”,
“description”: “”,
“url”: “https://cdn.muse.ai/w/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/data”,
“duration”: 426.84,
“width”: 1280,
“height”: 720,
“size”:251126000,
“tcreated”: 1559655942,
“visibility”: “public”,
“ingesting”: false,
“mature”: false,
“own”: true,
“views”: 9716,
“twatched”: 3824799,
}
Show response parameter details
Update Video Cover / Thumbnail
Using a timed frame from the video.
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

params = {
‘t’: ‘time’,
}

response = requests.post(‘https://muse.ai/api/files/set/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/cover’, params=params, headers=headers)
Show request parameter details
Response example
{
“status”: “success”
}
Uploading an image to set as the video thumbnail/cover.
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘thumbnail.jpg’, ‘rb’),
}

response = requests.post(‘https://muse.ai/api/files/set/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/cover’, headers=headers, files=files)
Show request parameter details
Response example
{
“status”: “success”
}
Upload subtitles
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘subtitles’: open(‘Japanese.vtt’, ‘rb’),
}

response = requests.post(‘https://muse.ai/api/files/subtitles/8KsbyKv’, headers=headers, files=files)
Show request parameter details
Response example
{
“id”: “N3wfN01lm”,
“name”: “Japanese”,
}
Update subtitles
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘name’: (None, ‘Javanese’),
}

response = requests.post(‘https://muse.ai/api/files/subtitles/8KsbyKv/N3wfN01lm/set’, headers=headers, files=files)
Show request parameter details
Delete subtitles
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.post(‘https://muse.ai/api/files/subtitles/8KsbyKv/N3wfN01lm/delete’, headers=headers)
List subtitles
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://muse.ai/api/files/subtitles/8KsbyKv’, headers=headers)
Response example
{
“N3wfN01lm”: “Javanese”
}
Download subtitles
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://muse.ai/api/files/subtitles/8KsbyKv/N3wfN01lm’, headers=headers)

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

Collections
Store and retrieve collections.

List collections
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://muse.ai/api/files/collections’, headers=headers)
Response example
[
{
“name”: “My Public Collection”,
“scid”: “bdZofqF”,
“tcreated”: 1597247468,
“visibility”: “public”,
“videos”: [
{
“svid”: “8KsbyKv”,
“duration”: 426.84,
“fid”: “b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157”,
“url”: “https://cdn.muse.ai/w/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/data”
}
]
}
]
Show response parameter details
Get a collection
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://muse.ai/api/files/collections/bdZofqF’, headers=headers)
Response example
{
“name”: “My Public Collection”,
“own”: true,
“visibility”: “public”,
“videos”: [
{
“svid”: “8KsbyKv”,
“description”: “”,
“duration”: 426.84,
“fid”: “b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157”,
“filename”: “The_Solar_System.mp4”,
“ingesting”: false,
“size”:251126000,
“tadded”: 1597247477,
“tcreated”: 1559655942,
“title”: “The Solar System”,
“url”: “https://cdn.mus.ai/w/b47a65b9351e38e6eb86780b09f3e9f9b8e9d795f1af5111f2f34a7f31f9e157/data”,
“views”: 0,
“visibility”: “public”,
“width”: 1920,
“height”: 1080
}
]
}
Show response parameter details
Create a collection
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

json_data = {
‘name’: ‘My Public Collection’,
‘visibility’: ‘public’,
}

response = requests.post(‘https://muse.ai/api/files/collections’, headers=headers, json=json_data)
Show request parameter details
Response example
{
“scid”: “8KsbyKv”
}
Delete a collection
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.delete(‘https://muse.ai/api/files/collections/8KsbyKv’, headers=headers)
Add a video to a collection
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

json_data = {
‘svid’: ‘8KsbyKv’,
}

response = requests.post(‘https://muse.ai/api/files/collections/bdZofqF/add’, headers=headers, json=json_data)
Show request parameter details
Remove a video from a collection
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.delete(‘https://muse.ai/api/files/collections/bdZofqF/8KsbyKv’, headers=headers)

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

Search
Search for anything inside your video collection using our bleeding-edge AI video search. Easily find people, speech, objects, text, actions, sounds, and jump to the second when they happen.

For example, you can search for “person:musk object:car” to find moments where Elon Musk shows up next to a car. You can also use short specifiers like “o:car”.

See the full list of search modalities below:

Speech
s:keyword
Faces
f:keyword
Text
t:keyword
Objects
o:keyword
Actions
a:keyword
Sounds
z:keyword
Title
n:keyword
Description
d:keyword
Search owned videos
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

params = {
‘q’: ‘hello world’,
}

response = requests.get(‘https://muse.ai/api/search’, params=params, headers=headers)
Response example
[
[“8KsbyKv”, [1.23, 3.45]]
]
Search channel
Request example
import requests

params = {
‘q’: ‘hello world’,
}

response = requests.get(‘https://muse.ai/api/search/channel/DrN7yT9’, params=params)
Response example
[
[“8KsbyKv”, [1.23, 3.45]]
]
Search public collection
Request example
import requests

params = {
‘q’: ‘hello world’,
}

response = requests.get(‘https://muse.ai/api/search/collection/bdZofqF’, params=params)
Response example
[
[“8KsbyKv”, [1.23, 3.45]]
]
Search public video
Request example
import requests

params = {
‘q’: ‘hello world’,
}

response = requests.get(‘https://muse.ai/api/search/video/8KsbyKv’, params=params)
Response example
[
[“8KsbyKv”, [1.23, 3.45]]
]

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

AlignOpen demo
Find a position of each word in a speech segment by aligning transcript with audio.

Align audio with transcript
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.wav’, ‘rb’),
‘phrase’: (None, ‘All men are created equal. I have a dream.’),
}

response = requests.post(‘https://api.muse.ai/align’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“words”: [[0.44, 0.71, “All”], [0.71, 0.97, “men”], [0.97, 1.2, “are”], [1.2, 1.59, “created”], [1.59, 2.13, “equal”], [2.13, 2.38, “I”], [2.38, 2.6, “have”], [2.6, 2.69, “a”], [2.69, 3.26, “dream”]]
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

words

array
A list of [start, end, word] triples

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

SoundsOpen demo
Identify sound types in an audio file. Currently supported types include: speech, music, applause, laughter, and silence.

Identify audio
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.wav’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/sounds’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“sounds”: {
“speech”: [[0.53, 0.87], [2.02, 3.09]],
“music”: [[0.87, 1.3]],
“silence”: [[1.3, 2.31]],
“laughter”: [[2.65, 2.92]],
“applause”: [[2.31, 2.65]]
}
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

soundsmap

Key is a string with the sound type and the value is a list of pairs of start and end times

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

SpeechOpen demo
Perform speech recognition on video or audio files to generate transcripts of speech.

Transcribe audio
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.wav’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/speech’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“transcript”: “we choose to go to the moon in this decade”
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

transcript

string
Transcript of the provided audio

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

ColorsOpen demo
Identify colors in images.

Identify colors
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.png’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/colors’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“colors”: {“black”: 0.252, “blue”: 0.035, “brown”: 0.08, “green”: 0.01, “grey”: 0.591, “orange”: 0.01, “pink”: 0.01, “purple”: 0.0, “red”: 0.0, “white”: 0.01, “yellow”: 0.0}
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

colorsmap

Key is a string with the color and the value is the proportion of that color in the image

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

FacesOpen demo
Detect when and where faces appear in a video. Similar faces are grouped together, and known faces are labeled.

Detect faces
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.mp4’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/faces’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“faces”: {
“e5d07990e0ad443d90a8ca4ef11cf3ba”: {
“label”: null,
“faces”: {“95dbaa6c00b09be87fb4b2a038cc509036cf59fdc93cd2b8445f755203a990a3”: {
“s”: 2.12,
“e”: 5.32,
“x”: 0.48,
“y”: 0.36,
“w”: 0.15,
“h”: 0.17,
“q”: 0.5
}
}
}
}
}
Show response parameter details
List faces
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

response = requests.get(‘https://api.muse.ai/faces/db’, headers=headers)
Response example
{
“detected”:
{“815b4f79c996408abac72ca6866da1d7”:
{“label”: null,
“faces”:
{“fdeed8e00e5d651f737e90f343e175080244c040e0f1518b30654baebf3bef3a”:
{“moment”: {
“f”: “4c2ec982c22bbb23fdc734762d7310230e09bec386fbac7946a5a6453eb16e0b”,
“s”: 174.0,
“e”: 180.92,
“x”: 0.28,
“y”: 0.14,
“w”: 0.21,
“h”: 0.49,
“q”: 0.5}
}
}
}
},
“deleted”:
{“142abde00e5d651f737e90f343e175080244c040e0f1518b30654baebf3bef3a”:
{“moment”: {
“f”: “4c2ec982c22bbb23fdc734762d7310230e09bec386fbac7946a5a6453eb16e0b”,
“s”: 108.0,
“e”: 108.75,
“x”: 0.74,
“y”: 0.23,
“w”: 0.13,
“h”: 0.26,
“q”: 1}
}
},
“ignored”:
{“504afa20acda45ec4d690dc7aa60f612e90b0954b82a3eac369964a31d62ed4d”:
{“moment”: {
“f”: “4c2ec982c22bbb23fdc734762d7310230e09bec386fbac7946a5a6453eb16e0b”,
“s”: 76.0,
“e”: 77.58,
“x”: 0.19,
“y”: 0.4,
“w”: 0.08,
“h”: 0.17,
“q”: 1}
}
}
}
Show response parameter details
Modify faces
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
‘Content-Type’: ‘application/json’,
}

data = ‘{“0c3e64b7c7fa9753b589d90a1e0c821fa76c949256614d31bb0cd3ce6346d1c1”:\n {“label”: “Jenny”,\n “delete”: False,\n “ignore”: False,\n “purge”: False}}’

response = requests.post(‘https://api.muse.ai/faces/modify’, headers=headers, data=data)
Show request parameter details
Response example
{
“status”: “ok”
}
Show response parameter details

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

ObjectsOpen demo
Recognize common objects in images.

Identify objects in an image
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.png’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/objects’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“objects”: {
“person”: [{“x”: 0.508, “y”: 0.281, “w”: 0.514, “h”: 0.233, “q”: 0.5},
{“x”: 0.425, “y”: 0.102, “w”: 0.310, “h”: 0.410, “q”: 0.5}],
“bicycle”: [{“x”: 0.488, “y”: 0.402, “w”: 0.491, “h”: 0.221, “q”: 0.5}]
}
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

objects

map
Key is detected objects and value is their coordinates

Coordinate representation

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users

TextOpen demo
Find and recognize text in an image.

Identify text in an image
Request example
import requests

headers = {
‘Key’: ‘YOUR_KEY’,
}

files = {
‘file’: open(‘input.png’, ‘rb’),
}

response = requests.post(‘https://api.muse.ai/text’, headers=headers, files=files)

  • Follows the API Flow steps

Show request parameter details
Response example
{
“status”: “done”,
“text”: {
“hello”: [{“x”: 0.108, “y”: 0.281, “w”: 0.314, “h”: 0.233, “q”: 0.5}],
“world”: [{“x”: 0.452, “y”: 0.280, “w”: 0.295, “h”: 0.221, “q”: 0.5}]
}
}
Hide response parameter details
Response body
status

string
Indicates the status of the job (“done”, “pending”, or “error”)

text

map
Key is a string with the text and the value is the bounding box

Coordinate representation

Ctrl+M
Welcome to WritingMate.ai
an AI-powered communications
and writing assistant
By continuing you agree to our Privacy Policy
4.8
Trusted by 10,000+ users