Animated Image from Text by Mojju

Animated Image from Text by Mojju · Actions GPT

Replicate API

API for interacting with the Replicate machine learning model prediction service, including the Stable Diffusion model.

  • POST /predictionsCreate a new prediction for an image with stable diffusion
  • GET /predictions/{prediction_id}Get prediction status and output
Schéma original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "Replicate API",
    "description": "API for interacting with the Replicate machine learning model prediction service, including the Stable Diffusion model.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://api.replicate.com/v1"
    }
  ],
  "paths": {
    "/predictions": {
      "post": {
        "summary": "Create a new prediction for an image with stable diffusion",
        "operationId": "createPrediction",
        "tags": [
          "Predictions"
        ],
        "requestBody": {
          "description": "Prediction request parameters",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredictionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiToken": []
          }
        ]
      }
    },
    "/predictions/{prediction_id}": {
      "get": {
        "summary": "Get prediction status and output",
        "operationId": "getPredictionStatus",
        "tags": [
          "Predictions"
        ],
        "parameters": [
          {
            "name": "prediction_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionStatusResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PredictionRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "The model version"
          },
          "input": {
            "type": "object",
            "properties": {
              "prompt": {
                "type": "string"
              },
              "path": {
                "type": "string",
                "enum": [
                  "toonyou_beta3.safetensors",
                  "lyriel_v16.safetensors",
                  "rcnzCartoon3d_v10.safetensors",
                  "majicmixRealistic_v5Preview.safetensors",
                  "realisticVisionV40_v20Novae.safetensors"
                ],
                "default": "majicmixRealistic_v5Preview.safetensors"
              },
              "n_prompt": {
                "type": "string",
                "default": "badhandv4, easynegative, ng_deepnegative_v1_75t, verybadimagenegative_v1.3, bad-artist, bad_prompt_version2-neg, teeth"
              },
              "seed": {
                "type": "integer",
                "description": "Random number used for generating predictions"
              },
              "steps": {
                "type": "integer",
                "description": "Number of steps for prediction processing",
                "default": 25
              },
              "motion_module": {
                "type": "string",
                "description": "Motion module identifier",
                "default": "mm_sd_v14"
              },
              "guidance_scale": {
                "type": "number",
                "default": 7.5
              }
            },
            "required": [
              "prompt",
              "path",
              "n_prompt",
              "seed",
              "steps",
              "motion_module",
              "guidance_scale"
            ]
          }
        },
        "required": [
          "version",
          "input"
        ]
      },
      "PredictionResponse": {
        "type": "object",
        "properties": {
          "completed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/PredictionRequest"
          },
          "logs": {
            "type": "string"
          },
          "metrics": {
            "type": "object",
            "properties": {
              "predict_time": {
                "type": "number"
              }
            }
          },
          "output": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "urls": {
            "type": "object",
            "properties": {
              "get": {
                "type": "string"
              },
              "cancel": {
                "type": "string"
              }
            }
          },
          "version": {
            "type": "string"
          }
        }
      },
      "PredictionStatusResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "urls": {
            "type": "object",
            "properties": {
              "get": {
                "type": "string"
              },
              "cancel": {
                "type": "string"
              },
              "stream": {
                "type": "string",
                "nullable": true
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  }
}