Predictions

Changelog

Jan 08, 2024

Introducing new workflows Generate QR Art V5 and Generate QR Art V5s:

  1. generate_qr_art_v5

  2. generate_qr_art_v5s

Dec 22:

Introducing new workflows:

  1. Outpainting allowing users to expand the boundaries of their images seamlessly.

  2. generate_qr_art_v4real same as generate_qr_art_v4 but good at photo realistic style.

  3. generate_qr_art_v4niji same as generate_qr_art_v4 but good at anime style.

  4. generate_qr_art_v4dream same as generate_qr_art_v4 but good at photorealism without sacrificing range.

Nov 28:

Introducing a new workflow structure:

  1. generate_qr_art_v4: This version is optimized for results similar to those seen on our homepage. It does not accept step parameters, and the credit cost is consistently set at 2.49 credits per image.

  2. generate_qr_art_v4s: Tailored for both speed and cost-effectiveness, this version is available at a more economical rate of 1 credit per image.

Body Update for v4 and beyond:

  • The field qrImage has been removed. In its place, a mandatory field qrContent has been introduced. From version 4 onwards, QR Art will be automatically generated based on the QR content you provide. It's no longer necessary to submit a Black and White QR Code.

  • A new feature, isScannable, has been added. This will verify the scannability of the output QR Code.

  • batchSize has been introduced, allowing the generation of up to 4 QR Art pieces in a single operation.

Aug 28:

  • add new workflow: generate_qr_art_v3a & generate_qr_art_v3b

Jul 30:

  • add new workflow: generate_qr_art_v1.1 & generate_qr_art_v2

  • support webhook to get the final result of the prediction.

Jun 27:

  • Update List predictions paginate response.

  • Change data type of qrSteps from string to integer (API create a prediction).

  • Instructions for NSFW case.

Creating a prediction

Create a QR Code Art.

POST https://api.quickqr.art/v1/predictions/queue

Creates a QR Code Art.

Headers

Name
Type
Description

x-api-key*

string

Your x-api-key

Request Body

Name
Type
Description

qrImage*

string

URL of asset (in case of QR Art, this is the URL to your classic QR Code)

Required field for versions(v1, v1.1, v2, v3a, v3b), for the remaining versions, please ignore this field. Example

qrText*

string

The prompt to generate

qrStrength

float

QR Weight determines how much the final image will portray your QR.

Range: 0.0–3.0

Version 1, 1.1, 2, 3a, 3b

Default value: 0.85

Version 4, 4s

Default value: 1.5

qrSteps

integer

Balance steps is how many time the image is sampled. More steps maybe more artistic but also reduce the QR scannability .

Version 1, 1.1, 2, 3a, 3b

Range: 10–20

Default value: 16

Version 4s

Range: 10-60

Default value: 20

seed

integer

Seed number to create a field of visual noise, similar to television static, as a starting point for generating the initial image grids.

Range: 0-9007199254740991

Default value: random

negativePrompt

string

The negative prompt (what you don't want to see in the generated images.)

workflow*

string

Workflow that you want to run.

Get workflow name here

webhook

string

An HTTPS URL for receiving a webhook when the prediction has new output. The webhook will be a POST request where the request body is the same as the response body of the get prediction operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once.

qrContent*

string

Content of QR (link, text, phone, email, ...)

Required field for versions(v4, v4s), for the remaining versions, please ignore this field. Example

{
   "success":true,
   "data":{
      "id":"",
      "userId":"",
      "createdAt":"2023-06-21T15:02:34.401Z",
      "startedAt":null,
      "updatedAt":"2023-06-21T15:02:34.401Z",
      "completedAt":null,
      "status":"queued",
      "input":{
         "workflow":"generate_qr_art",
         "qrStrength":0.85,
         "qrSteps":10,
         "seed":1000,
         "qrImage":"",
         "qrText":"a cute cat",
         "negativePrompt":""
      },
      "output":"",
      "error": null,
      "refunded":false,
      "creditType":"API_CREDITS",
      "isScanables": [
            true
        ],
      "credits":1
   }
}

Note: Use raw/json body or use example cURL request:

Example for v4:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v4",
    "qrStrength": 1.5,
    "qrContent": "https://quickqr.art",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "seed": 2800163943969242,
    "webhook": ""
}
'

Example for v4s:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v4s",
    "qrStrength": 1.5,
    "qrContent": "https://quickqr.art",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "qrSteps": 20,
    "seed": 2800163943969242,
    "webhook": ""
}
'

Example for v4real:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v4real",
    "qrStrength": 1.5,
    "qrContent": "https://quickqr.art",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "qrSteps": 20,
    "seed": 2800163943969242,
    "webhook": ""
}
'

Example for v4niji:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v4niji",
    "qrStrength": 1.5,
    "qrContent": "https://quickqr.art",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "qrSteps": 20,
    "seed": 2800163943969242,
    "webhook": ""
}
'

Example for v4dream:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v4dream",
    "qrStrength": 1.5,
    "qrContent": "https://quickqr.art",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "qrSteps": 20,
    "seed": 2800163943969242,
    "webhook": ""
}
'

Example for v1, v1.1, v2, v3a, v3b:

curl --location 'https://api.quickqr.art/v1/predictions/queue' \
--header 'x-api-key: <Insert your api key>' \
--header 'Content-Type: application/json' \
--data '{
    "workflow": "generate_qr_art_v1.1",
    "qrStrength": 1.5,
    "qrImage": "https://media.discordapp.net/attachments/1121322589256683670/1124532692797640775/qr.png?width=1152&height=1152",
    "qrText": "best quality, masterpiece, depth of field, beautiful woman, big dress, trees, flowers, sky, water",
    "negativePrompt": "",
    "qrSteps": 15,
    "seed": 2800163943969242,
    "webhook": ""
}
'

Workflow available:

  • Version 1: generate_qr_art

  • Version 1.1: generate_qr_art_v1.1

  • Version 2: generate_qr_art_v2

  • Version 3a: generate_qr_art_v3a

  • Version 3b: generate_qr_art_v3b

  • Version 4: generate_qr_art_v4

  • Version 4s: generate_qr_art_v4s

  • Version 4real: generate_qr_art_v4real

  • Version 4niji: generate_qr_art_v4niji

  • Version 4dream: generate_qr_art_v4dream

  • Version 5: generate_qr_art_v5

  • Version 5s: generate_qr_art_v5s

Read more version information here

If NSFW content is detected, the following error will be returned: "NSFW content detected. Try running it again, or try a different prompt." Please note that credits will be deducted as GPU compute power is utilized. We kindly ask you to exercise caution when making requests and ensure that appropriate content filters are in place. For more information, please refer to our Community Standards.

Get a prediction

Get a prediction

GET https://api.quickqr.art/v1/predictions/{prediction_id}

Get a prediction

Path Parameters

Name
Type
Description

predictionId*

string

The ID of the prediction you want to get.

Headers

Name
Type
Description

x-api-key*

string

Your x-api-key

{
   "success":true,
   "data":{
      "id":"",
      "userId":"",
      "createdAt":"2023-06-21T15:02:34.401Z",
      "startedAt":null,
      "updatedAt":"2023-06-21T15:02:34.401Z",
      "completedAt":null,
      "status":"queued",
      "input":{
         "workflow":"generate_qr_art",
         "qrStrength":0.85,
         "qrSteps":10,
         "seed":1000,
         "qrImage":"",
         "qrText":"a cute cat",
         "negativePrompt":""
      },
      "output":"",
      "error": null,
      "refunded":false,
      "creditType":"API_CREDITS",
      "isScanables": [
            true
        ],
      "credits":1,
   }
}

Returns the same response as the create a prediction operation. status will be one of:

  • queued: the prediction is starting up. If this status lasts longer than a few seconds, then it's typically because a new worker is being started to run the prediction.

  • executing: your QR Art is generating by our workers.

  • executed: the prediction completed successfully.

  • failed: the prediction encountered an error during processing.

In the case of success, output will be an object containing the output of the QR Art. Any files will be represented as URLs.

In the case of failure, error will contain the error encountered during the prediction.

In the case of NSFW contents in your result, we will mark that prediction's status as failed and the output field will be NSFW contents detected!

List predictions

List predictions

GET https://api.quickqr.art/v1/predictions

List predictions

Query Parameters

Name
Type
Description

limit

integer

Default: 10

offset

integer

Default: 0

Headers

Name
Type
Description

x-api-key*

string

Your x-api-key

{
   "data":{
      "docs":[
         {
            "userId":"",
            "status":"executed",
            "refunded":false,
            "creditType":"API_CREDITS",
            "credits":4,
            "output":"",
            "startedAt":"2023-06-27T09:14:52.746Z",
            "completedAt":"2023-06-27T09:15:09.212Z",
            "id":"",
            "input":{
               "workflow":"normal_work_flow",
               "qrStrength":0.6,
               "qrSteps":12,
               "qrImage":"",
               "qrText":"a man riding a cat",
               "negativePrompt":"",
               "seed":2345
            }
         }
      ],
      "totalDocs":1,
      "offset":0,
      "limit":10,
      "totalPages":1,
      "page":1,
      "pagingCounter":1,
      "hasPrevPage":false,
      "hasNextPage":false,
      "prevPage":null,
      "nextPage":null
   }
}

Last updated