Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
|
| 4 |
+
response = requests.post(
|
| 5 |
+
"https://api.respell.ai/v1/run",
|
| 6 |
+
headers={
|
| 7 |
+
# This is your API key
|
| 8 |
+
"Authorization": "Bearer 6438355a-133a-4ad6-9674-a4f9be050cf8",
|
| 9 |
+
"Accept": "application/json",
|
| 10 |
+
"Content-Type": "application/json"
|
| 11 |
+
},
|
| 12 |
+
data=json.dumps({
|
| 13 |
+
"spellId": "9M0c8QbC2gYfeigDjNhpm",
|
| 14 |
+
# This field can be omitted to run the latest published version
|
| 15 |
+
"spellVersionId": "hc0fOdSXkCiPQ_FFrRg-i",
|
| 16 |
+
# Fill in values for each of your 2 dynamic input blocks
|
| 17 |
+
"inputs": {
|
| 18 |
+
"input": "Example text",
|
| 19 |
+
"input_2": "Example text",
|
| 20 |
+
}
|
| 21 |
+
}),
|
| 22 |
+
)
|