POST
/
models
/
v2
/
openai-community
/
{model}
curl --request POST \
  --url https://api.bytez.com/models/v2/openai-community/{model} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "<string>",
  "stream": true,
  "params": {
    "min_length": 123,
    "max_length": 123
  }
}'
{
  "output": "<string>"
}

Authorizations

Authorization
string
header
required

Provide your API key as Key your-key-here in the Authorization header.

Path Parameters

model
string
required

The specific open source model to run (e.g., gpt2).

Body

application/json
Send input text and parameters to the model.
text
string
required

Input text to be processed by the model.

params
object
required
stream
boolean

Enable or disable streaming responses.

Response

200 - application/json
Successful response from the model.
output
string

The model's output.