POST
/
models
/
v2
/
openai-community
/
gpt2
curl --request POST \
  --url https://api.bytez.com/models/v2/openai-community/gpt2 \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "Humpty Dumpty sat on a"
}'
{
  "output": "Humpty Dumpty sat on a wall, enjoying the view."
}

Authorizations

Authorization
string
header
required

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

Body

application/json
text
string
required

Input prompt for text generation.

Example:

"Humpty Dumpty sat on a"

Response

200 - application/json
Successful response with generated text.
output
string

Generated text.