Run Model
Runs an open/closed model. Note, if you’re running an open model and haven’t created a cluster, this call automatically creates a cluster for you.
POST
Authorizations
Set Authorization
header to Key BYTEZ_KEY
(e.g. 'Authorization': 'Key ABC123')
Path Parameters
The model you want to run (e.g., openai-community/gpt2
).
Body
application/json
The required inputs vary by task. For text-based tasks like text-generation, summarization, and translation, include the "text" field. For chat tasks, use "messages". For image tasks (like image-to-text, image-classification, object-detection, etc.), supply input using either "url" or "base64". For audio tasks such as automatic-speech-recognition, provide audio using "url" or "base64". Question-based tasks like question-answering require both "question" and "context". Zero-shot tasks need "candidate_labels" and may also require "text" or "image". Some tasks, like unconditional-image-generation, may not need any input. Always refer to the specific model's task to determine the required fields.
The body is of type object
.
Response
200
application/json
Successful response from the model.
The response is of type object
.