{
  "item": [
    {
      "name": "Generations",
      "description": {
        "content": "Create images and videos, poll them, cancel them and download results",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "Create an image or video",
          "request": {
            "name": "Create an image or video",
            "description": {
              "content": "Starts an asynchronous job. `plan` is required and the system never switches group: when the chosen group is out of quota or credits you get an error and can retry with the other plan. Poll `GET /v1/generations/{id}` or receive a webhook.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "generations"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": "1 to 255 printable ASCII characters. Repeating a request with the same key and body returns the first job and charges once. Without it, an identical request within 120 seconds also returns the first job; send a different key per call to create variants of the same prompt",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plan\": \"credits\",\n  \"model\": \"nano-banana-2\",\n  \"params\": {\n    \"prompt\": \"A lighthouse at dusk, oil painting\",\n    \"aspect_ratio\": \"16:9\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "Get a job",
          "request": {
            "name": "Get a job",
            "description": {
              "content": "Returns the job. With `wait` the request is held open until the job reaches a final status or the wait ends, whichever comes first.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "generations",
                ":id"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [
                {
                  "disabled": false,
                  "key": "wait",
                  "value": "60",
                  "description": "Seconds to hold the request open until the job finishes. Values above 60 are treated as 60"
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "{{generationId}}",
                  "key": "id",
                  "description": "(Required) Generation id"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "Cancel a job",
          "request": {
            "name": "Cancel a job",
            "description": {
              "content": "Cancels a job that has not started running and refunds it in full. A job that is already processing returns `not_cancellable`.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "generations",
                ":id",
                "cancel"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "{{generationId}}",
                  "key": "id",
                  "description": "(Required) Generation id"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "Download the result of a job",
          "request": {
            "name": "Download the result of a job",
            "description": {
              "content": "CheapVids streams the result of a job created through the API; nothing is stored. Authenticate with your API key, or use the signed `output.url` (`exp` and `sig`) which works without a key, for example in a `<video>` tag. Supports one `Range` per request. After the download window (`results.api_ttl_hours` in `GET /v1/account`) the result is gone: `410 result_expired`. Per-account limits on parallel streams, daily bytes and downloads per result apply and answer `429` with `Retry-After`.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "generations",
                ":id",
                "content"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "exp",
                  "value": "",
                  "description": "Expiry (Unix seconds) of a signed URL. Use together with sig instead of an API key"
                },
                {
                  "disabled": true,
                  "key": "sig",
                  "value": "",
                  "description": "Signature of a signed URL, as returned in output.url"
                },
                {
                  "disabled": true,
                  "key": "download",
                  "value": "1",
                  "description": "Set to 1 to send Content-Disposition: attachment"
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "{{generationId}}",
                  "key": "id",
                  "description": "(Required) Generation id"
                }
              ]
            },
            "header": [
              {
                "disabled": true,
                "description": "One byte range, for example bytes=0-1048575. Used for seeking in video",
                "key": "Range",
                "value": "bytes=0-1048575"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "Get the size and type of the result of a job",
          "request": {
            "name": "Get the size and type of the result of a job",
            "description": {
              "content": "Same checks and limits as the download. Returns the headers, including Content-Length with the total size, and no body.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "generations",
                ":id",
                "content"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "exp",
                  "value": "",
                  "description": "Expiry (Unix seconds) of a signed URL. Use together with sig instead of an API key"
                },
                {
                  "disabled": true,
                  "key": "sig",
                  "value": "",
                  "description": "Signature of a signed URL, as returned in output.url"
                },
                {
                  "disabled": true,
                  "key": "download",
                  "value": "1",
                  "description": "Set to 1 to send Content-Disposition: attachment"
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "{{generationId}}",
                  "key": "id",
                  "description": "(Required) Generation id"
                }
              ]
            },
            "header": [
              {
                "disabled": true,
                "description": "One byte range, for example bytes=0-1048575. Used for seeking in video",
                "key": "Range",
                "value": "bytes=0-1048575"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "HEAD"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "Models",
      "description": {
        "content": "Models you can use and their prices",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "List models",
          "request": {
            "name": "List models",
            "description": {
              "content": "The models on sale with their capabilities, parameters, credit price table and whether they are included in the Studio plan (`studio_eligible`). Same data as the web app.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "models"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "Account",
      "description": {
        "content": "Your plans, credits, limits and usage",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "Get your account",
          "request": {
            "name": "Get your account",
            "description": {
              "content": "Both plan groups side by side and independent: Studio daily quota and Credits balance, with the limits that apply to each, plus the result download window and limits.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "account"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "Get usage by day",
          "request": {
            "name": "Get usage by day",
            "description": {
              "content": "Jobs per UTC day, plan group, model and kind. At most 31 days; the default is the last 7 days.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "usage"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "from",
                  "value": "",
                  "description": "First day (UTC), YYYY-MM-DD. Default: 6 days before to"
                },
                {
                  "disabled": true,
                  "key": "to",
                  "value": "",
                  "description": "Last day (UTC, inclusive), YYYY-MM-DD. Default: today"
                }
              ],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "OpenAI compatible",
      "description": {
        "content": "Image generation compatible with the OpenAI client libraries",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "Create an image (OpenAI compatible)",
          "request": {
            "name": "Create an image (OpenAI compatible)",
            "description": {
              "content": "Works with the OpenAI client libraries when `base_url` is set to `https://api.cheapvids.com/v1`. Only `images/generations` is supported, with `n` = 1; there is no `edits` or `variations`. The request waits for the image and answers `504 generation_pending` with `details.generation_id` when it takes too long; poll `GET /v1/generations/{id}` then. Retrying the same request does not charge twice.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "images",
                "generations"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": "Optional. Same key and body returns the first job",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "disabled": true,
                "description": "studio or credits. Without plan or X-Plan a model that is not in Studio uses credits; a Studio model needs one of them",
                "key": "X-Plan",
                "value": "string"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"gpt-image-2.5\",\n  \"prompt\": \"A lighthouse at dusk, oil painting\",\n  \"size\": \"1024x1024\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    }
  ],
  "event": [],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.cheapvids.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    },
    {
      "key": "generationId",
      "value": "",
      "type": "string"
    }
  ],
  "info": {
    "name": "CheapVids API",
    "description": "Public CheapVids API. Set the `apiKey` variable to your key; `plan` is required when creating a job.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  }
}
