v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

Run Model

Runs an open/closed model. Acts serverlessly. (We manage everything behind the scenes.)

post/models/v2/{modelId}

Path parameters

modelIdstring required

The model you want to run (e.g., openai-community/gpt2).

Request body

textstring

Input text to be processed by the model (used for most NLP tasks).

urlstring uri

URL to an image, audio, or video file (used for image/audio/video tasks).

base64string

Handles Base64-encoded image, audio, or video. Using URLs is recommended to avoid large payloads, which slow your requests down.

questionstring

Question text (used in question-answering tasks).

contextstring

Context paragraph (used in question-answering).

candidate_labelsstring[]

List of candidate labels (used in zero-shot tasks).

streamboolean

Enable/disable text streaming.

jsonboolean

Similar to stream, but for media. Streams back media instead returning it in JSON format.

Response

Successful response from the model.

errorstring

Null if everything is fine