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.
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
Input text to be processed by the model (used for most NLP tasks).
An array of chat messages representing the conversation history. Each message must have a role
(system
, user
, or assistant
) and content
.
The content
can be:
- A simple string - An array of content blocks where each block has a
type
(e.g.text
,image
,audio
, orvideo
) and the corresponding data viatext
,url
, orbase64
.
URL to an image, audio, or video file (used for image/audio/video tasks).
Handles Base64-encoded image, audio, or video. Using URLs is recommended to avoid large payloads, which slow your requests down.
Question text (used in question-answering tasks).
Context paragraph (used in question-answering).
List of candidate labels (used in zero-shot tasks).
Enable/disable text streaming.
Similar to stream, but for media. Streams back media instead returning it in JSON format.
Model-specific parameters. See model documentation for details.