Skip to main content
POST
/
models
/
v2
/
google
/
flan-t5-base
text2text-generation
curl --request POST \
  --url https://api.bytez.com/models/v2/google/flan-t5-base \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "Once upon a time there was a beautiful home where",
  "stream": true
}
'
{
  "error": "<string>",
  "output": "Once upon a time there was a beautiful home where there was a happy cat"
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for text2text-generation models

text
string
required

The input text

Example:

"Once upon a time there was a beautiful home where"

stream
boolean

Enable text streaming.

Response

Successful text2text-generation response.

error
string | null
required

Null on success; otherwise an error message.

output
string
required

Successful response with generated text

Example:

"Once upon a time there was a beautiful home where there was a happy cat"