Skip to main content

# Prediction

##

    POST /api/v1/predictions/ai/deforum_stable_diffusion

Run a single prediction on the model

## Request​

### Header Parameters

apikey stringrequired

- application/json

### Body

input object
angle Angle (string)required

Default value: `0:(0)`

angle parameter for the motion

animation_prompts Animation Prompts (string)required

Default value: `0: a beautiful portrait of a woman by Artgerm, trending on Artstation`

Prompt for animation. Provide 'frame number : prompt at this frame', separate different prompts with '|'. Make sure the frame number does not exceed the max_frames.

color_coherence color_coherence (string)required

Possible values: [`None`, `Match Frame 0 HSV`, `Match Frame 0 LAB`, `Match Frame 0 RGB`]

An enumeration.

fps Fps (integer)required

Possible values: `>= 10` and `<= 60`

Default value: `15`

Choose fps for the video.

max_frames Max Frames (integer)required

Possible values: `>= 100` and `<= 1000`

Default value: `30`

Number of frames for animation

sampler sampler (string)required

Possible values: [`klms`, `dpm2`, `dpm2_ancestral`, `heun`, `euler`, `euler_ancestral`, `plms`, `ddim`]

An enumeration.

seed Seed (integer)required

Random seed. Leave blank to randomize the seed

translation_x Translation X (string)required

Default value: `0: (0)`

translation_x parameter for the motion

translation_y Translation Y (string)required

Default value: `0: (0)`

translation_y parameter for the motion

zoom Zoom (string)required

Default value: `0: (1.04)`

zoom parameter for the motion

output_file_prefix Output File Prefix (string)required

## Responses​

- 200
- 422

Successful Response

- application/json

- Schema
- Example (from schema)

Schema

output urirequired
task object
api_error object
message stringrequired

Possible values: [`No + TaskIdKey + key found in request header`, `No + RequestIdKey + " key found in request header`, `No + TaskIdKey + value found in request header`, `No + RequestIdKey + " value found in request header`, `No + UIDkey + key found in request header`, `No + UIDkey + value found in request header`, `Uid value strconv atoi error is: \%s`, `Query db error is: \%s`, `Json marshal db content error is: \%s`, `Can not find out the task id %s in result cache.`, `Msg to kafka pb marshal error is: \%s`, `sync call back error is: \%s`, `sync response json marshal error is: \%s`, `Callback proto unmarshal http body error is: \%s`, `callback errror is:` , `Http header in callback body marshal error is:` , `Sync Or Async Return Json Unmarshal Error is %s`, `Task Return Json Marshal Error is %s`]

request_id stringrequired
exec_code stringrequired
exec_error stringrequired
is_success booleanrequired
task_error stringrequired
task_fee stringrequired
task_id uuidrequired
task_uid integerrequired

    {
      "output": "string",
      "task": {
        "api_error": {
          "message": "No  + TaskIdKey +  key found in request header",
          "request_id": "string"
        },
        "exec_code": "string",
        "exec_error": "string",
        "is_success": true,
        "task_error": "string",
        "task_fee": "string",
        "task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "task_uid": 0
      }
    }

Validation Error

- application/json

- Schema
- Example (from schema)

Schema

detail object[]
- Array [
loc object[]required
- Array [
anyOf

- MOD1
- MOD2

string

integer

- ]
msg Message (string)required
type Error Type (string)required
- ]

    {
      "detail": [
        {
          "loc": [
            "string",
            0
          ],
          "msg": "string",
          "type": "string"
        }
      ]
    }

Loading...