API
Integrate your interface as an API.
Get your RestAPI
import requests
API_URL = f"https://stack-inference.com/inference/v0/run/<YOUR_ORG_ID>/<YOUR_FLOW_ID>"
headers = {'Authorization':
'Bearer YOUR_PUBLIC_KEY',
'Content-Type': 'application/json'
}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
# you can add all your inputs here:
body = {'in-0': 'text for in-0', 'audio2text-0': 'base64 of audio to send',
'string-0': 'long string to send', 'url-0': 'url of website to load'}
output = query(body)Uploading Documents via API

API Endpoint
Example API Call
Last updated
Was this helpful?

