Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

API key provided as a Bearer token: Authorization: Bearer <api_key>. Get an API key at https://platform.inceptionlabs.ai.

Body

application/json
messages
EditMessageParam · object[]
required
model
string
required

The model to use for the edit completion.

max_tokens
integer
default:1024

Maximum number of tokens to generate.

Required range: 1 <= x <= 8192
temperature
number
default:0.2

What sampling temperature to use, between 0 and 2. Higher values make the output more random; lower values make it more focused and deterministic.

Required range: 0 <= x <= 2
top_p
number
default:1

Float that controls the cumulative probability of the top tokens to consider.

Required range: 0 <= x <= 1
presence_penalty
number
default:1

Number between -2 and 2. Positive values penalize tokens based on whether they have appeared in the text so far, increasing the model's likelihood to talk about new topics.

Required range: -2 <= x <= 2

Response

Successful Response

id
string
required
object
string
default:edit.completion
required
Allowed value: "edit.completion"
created
integer
required
model
string
required
choices
EditChoice · object[]
required
usage
EditUsage · object
required

Usage for edit completions.

warning
string | null