Skip to main content
POST
/
api
/
generate
curl --request POST \
  --url https://easy-peasy.ai/api/generate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "preset": "custom-generator",
  "keywords": "Write an email to potential investors about my startup",
  "outputs": 1,
  "language": "English",
  "shouldUseGPT4": false
}
'
[
  {
    "id": 10,
    "name": "Output 1"
  },
  {
    "id": 20,
    "name": "Output 2"
  }
]

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at https://easy-peasy.ai/settings/api

Headers

x-api-key
string
required

Your API key

Body

application/json
preset
string
required

The template name to use for generation. See Templates for the full list.

keywords
string
required

The main input text or topic for the template.

Maximum string length: 5000
tone
string

The desired tone of the output (e.g. professional, friendly, funny).

Maximum string length: 1000
length
enum<string>

The desired output length.

Available options:
Short,
Medium,
Long
outputs
integer
default:1

Number of outputs to generate.

language
string
default:English

Language for the output.

shouldUseGPT4
boolean
default:false

Whether to use the advanced AI model.

extra1
string

Additional context field. Usage varies by template (e.g. background information, key skills, blog intro).

Maximum string length: 1000
extra2
string

Additional context field. Usage varies by template (e.g. blog post title, reply sentiment).

Maximum string length: 1000
extra3
string

Additional context field. Usage varies by template (e.g. job title).

Maximum string length: 1000
extra4
string

Additional context field. Usage varies by template (e.g. recommendation details).

Maximum string length: 500
suffix
string

End section text for the Fill the Gaps template.

Maximum string length: 1000

Response

Returns the generated outputs as an array

id
integer
name
string
Example:
[
{ "id": 10, "name": "Output 1" },
{ "id": 20, "name": "Output 2" }
]