components:
    responses:
        BadRequest:
            content:
                application/json:
                    schema:
                        oneOf:
                            - $ref: '#/components/schemas/Error'
                            - $ref: '#/components/schemas/ModerationBlocked'
            description: The request was malformed, referenced an unavailable model, or was blocked by input content moderation (moderation blocks carry a `restriction_reason` — see ModerationBlocked).
        Forbidden:
            content:
                application/json:
                    schema:
                        $ref: '#/components/schemas/Error'
            description: Authenticated but not permitted (plan gate, ownership, account restriction). Content-moderation blocks are 400, not 403.
        NotFound:
            content:
                application/json:
                    schema:
                        $ref: '#/components/schemas/Error'
            description: The requested job was not found.
        TooManyRequests:
            content:
                application/json:
                    schema:
                        $ref: '#/components/schemas/Error'
            description: Rate or queue limit reached. Retry after a short delay.
        Unauthorized:
            content:
                application/json:
                    schema:
                        $ref: '#/components/schemas/Error'
            description: Missing or invalid API key.
    schemas:
        AudioJob:
            properties:
                audio_url:
                    description: The generated track or sound effect (signed URL, valid several hours); present once `status=succeeded`.
                    format: uri
                    type: string
                created_at:
                    format: date-time
                    type: string
                error:
                    type: string
                id:
                    example: aud_a1b2c3d4e5f6
                    type: string
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
                video_url:
                    description: Video-to-sound-effect jobs only — the input video with the generated effects mixed in (signed URL, valid several hours); present once `status=succeeded`.
                    format: uri
                    type: string
            type: object
        ConvertResponse:
            description: A completed format conversion. Download from `url`.
            properties:
                content_type:
                    example: image/webp
                    type: string
                credits_charged:
                    description: Credits charged for this conversion (2 image / 10 video / 3 audio).
                    type: integer
                filename:
                    description: Suggested download filename.
                    example: photo.webp
                    type: string
                retention:
                    example: 7 days
                    type: string
                size_bytes:
                    description: Converted file size in bytes.
                    type: integer
                url:
                    description: Signed download URL for the converted file (valid several hours; the file itself is kept 7 days).
                    format: uri
                    type: string
            type: object
        CostEstimate:
            description: The credit cost of a request. The real charge is always ≤ `credits` (failures cost nothing; sequential image jobs may use fewer images).
            properties:
                credits:
                    description: Credits the request will cost — the maximum, for non-deterministic cases.
                    example: 2750
                    type: integer
                exact:
                    description: True when the cost is exact; false when `credits` is an upper bound (e.g. seedream sequential, where the model picks the image count).
                    type: boolean
                model:
                    example: seedance-2.0
                    type: string
                type:
                    enum:
                        - image
                        - video
                        - audio
                        - conversion
                        - social
                        - moderation
                        - classification
                        - motion
                        - lip-sync
                        - upscale
                        - video-upscale
                    type: string
            required:
                - model
                - type
                - credits
                - exact
            type: object
        CreateAudioResponse:
            properties:
                id:
                    description: Opaque job id — use it to poll status.
                    example: aud_a1b2c3d4e5f6
                    type: string
                message:
                    type: string
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        CreateImageResponse:
            properties:
                id:
                    description: Opaque job id — use it to poll status.
                    example: img_a1b2c3d4e5f6
                    type: string
                message:
                    type: string
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        CreateMotionResponse:
            properties:
                credits:
                    description: Total price of this job (seconds x the model's per-second rate).
                    type: integer
                id:
                    description: Opaque job id (`mtn_...`) — use it to poll status.
                    type: string
                message:
                    type: string
                model:
                    type: string
                seconds:
                    description: Billed duration — the reference video's length
                    rounded up.: null
                    type: integer
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        CreatePostResponse:
            description: A published post.
            properties:
                credits_charged:
                    example: 10
                    type: integer
                id:
                    description: The post id.
                    type: integer
                media_type:
                    enum:
                        - image
                        - video
                        - audio
                    type: string
                moderation:
                    description: Image/video posts are rated after publish; feed visibility follows the review.
                    example: pending
                    type: string
                url:
                    description: Public URL of the post.
                    example: https://budgetpixel.com/p/12345
                    format: uri
                    type: string
            type: object
        CreateUpscaleResponse:
            properties:
                credits:
                    description: Total price of this job (flat per image
                    or the target-resolution tier for p-image-upscale).: null
                    type: integer
                id:
                    description: Opaque job id — use it to poll status.
                    type: string
                message:
                    type: string
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        CreateVideoResponse:
            properties:
                id:
                    description: Opaque job id — use it to poll status.
                    type: string
                message:
                    type: string
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        CreditBalance:
            properties:
                extra_credits:
                    description: Purchased credits that don't reset monthly.
                    type: integer
                monthly_limit:
                    type: integer
                monthly_remaining:
                    type: integer
                monthly_used:
                    type: integer
                total_available:
                    description: Total spendable credits (monthly remaining + extra).
                    type: integer
            type: object
        Error:
            properties:
                error:
                    properties:
                        code:
                            description: Stable machine-readable code.
                            example: model_not_available
                            type: string
                        message:
                            type: string
                        type:
                            description: Error category.
                            example: invalid_request_error
                            type: string
                    required:
                        - type
                        - code
                        - message
                    type: object
            required:
                - error
            type: object
        ImageJob:
            properties:
                created_at:
                    format: date-time
                    type: string
                error:
                    type: string
                id:
                    example: img_a1b2c3d4e5f6
                    type: string
                images:
                    description: Generated images (presigned URLs); present once `status=succeeded`.
                    items:
                        $ref: '#/components/schemas/ImageOutput'
                    type: array
                model:
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
            type: object
        ImageOutput:
            description: A generated image as a short-lived presigned URL.
            properties:
                position:
                    type: integer
                url:
                    format: uri
                    type: string
            type: object
        JobStatus:
            description: Lifecycle state. `succeeded`/`failed`/`timeout` are terminal.
            enum:
                - pending
                - starting
                - processing
                - completing
                - succeeded
                - failed
                - timeout
            type: string
        LipSyncJob:
            properties:
                completed_at:
                    format: date-time
                    type: string
                created_at:
                    format: date-time
                    type: string
                error_message:
                    type: string
                id:
                    type: string
                model:
                    type: string
                status:
                    description: Lifecycle state. `succeeded`/`failed`/`canceled` are terminal.
                    enum:
                        - pending
                        - processing
                        - succeeded
                        - failed
                        - canceled
                    type: string
                video_url:
                    description: Short-lived presigned URL; present once `status=succeeded`.
                    format: uri
                    type: string
            type: object
        Model:
            properties:
                credits_per_generation:
                    description: Per-output-image cost (images) or per-track cost (music). 0 for per-second models (video, sound effects) — see credits_per_unit.
                    example: 45
                    type: integer
                credits_per_unit:
                    description: Per-unit cost for metered models (e.g. per second of video). For resolution-priced models this is the default resolution's rate.
                    example: 220
                    type: integer
                min_billable_seconds:
                    description: Billing floor for per-second audio models (sound effects, Sonilo Music) — cost = credits_per_unit × max(min_billable_seconds, seconds rounded up). Absent for flat-priced models.
                    example: 3
                    type: integer
                name:
                    example: flux-2-klein
                    type: string
                resolution_pricing:
                    additionalProperties:
                        type: integer
                    description: For video models whose per-second rate varies by resolution, a map of resolution to per-second cost. Absent when pricing is flat.
                    example:
                        4k: 1250
                        480p: 100
                        720p: 220
                        1080p: 550
                    type: object
                type:
                    enum:
                        - image
                        - video
                        - audio
                    type: string
                unit_type:
                    description: The unit `credits_per_unit` applies to.
                    enum:
                        - generation
                        - second
                    type: string
            required:
                - name
                - type
                - credits_per_generation
            type: object
        ModerationBlocked:
            description: Returned (with HTTP 400) when the input content moderation gate blocks a generation request. The block is a property of the request's prompt or input media — reword the prompt or change the input and retry. Branch on `restriction_reason`, which is stable and machine-readable.
            properties:
                error:
                    description: Human-readable explanation of the block.
                    type: string
                restriction_reason:
                    description: Stable machine-readable block reason.
                    enum:
                        - input_csam
                        - input_explicit_adult
                        - input_upload_nudity
                        - input_celebrity_likeness
                        - strict_model_nsfw
                    type: string
            required:
                - error
                - restriction_reason
            type: object
        MotionJob:
            properties:
                completed_at:
                    format: date-time
                    type: string
                created_at:
                    format: date-time
                    type: string
                error_message:
                    type: string
                id:
                    type: string
                model:
                    type: string
                status:
                    description: Lifecycle state. `succeeded`/`failed`/`canceled` are terminal.
                    enum:
                        - pending
                        - processing
                        - succeeded
                        - failed
                        - canceled
                    type: string
                video_url:
                    description: Short-lived presigned URL; present once `status=succeeded`.
                    format: uri
                    type: string
            type: object
        UploadResponse:
            description: A stored, ephemeral input file. Pass `url` as a media parameter on a generation request.
            properties:
                bytes:
                    description: Stored file size in bytes.
                    type: integer
                content_type:
                    example: image/png
                    type: string
                expires_in:
                    description: Seconds the file is retained (~86400).
                    type: integer
                url:
                    description: Short-lived URL to use as a media input (valid ~24h).
                    format: uri
                    type: string
            type: object
        UpscaleJob:
            properties:
                completed_at:
                    format: date-time
                    type: string
                created_at:
                    format: date-time
                    type: string
                error_message:
                    type: string
                id:
                    type: string
                image_url:
                    description: Short-lived presigned URL of the upscaled image; present once `status=succeeded`.
                    format: uri
                    type: string
                model:
                    type: string
                status:
                    description: Lifecycle state. `succeeded`/`failed`/`canceled` are terminal.
                    enum:
                        - pending
                        - processing
                        - succeeded
                        - failed
                        - canceled
                    type: string
            type: object
        VideoJob:
            properties:
                aspect_ratio:
                    type: string
                completed_at:
                    format: date-time
                    type: string
                created_at:
                    format: date-time
                    type: string
                error_message:
                    type: string
                id:
                    type: string
                length_seconds:
                    type: integer
                model:
                    type: string
                started_at:
                    format: date-time
                    type: string
                status:
                    $ref: '#/components/schemas/JobStatus'
                updated_at:
                    format: date-time
                    type: string
                video_url:
                    description: Short-lived presigned URL; present once `status=succeeded`.
                    format: uri
                    type: string
            type: object
    securitySchemes:
        ApiKeyAuth:
            bearerFormat: bpx_live_*
            description: 'API key as a bearer token: Authorization: Bearer bpx_live_xxx'
            scheme: bearer
            type: http
info:
    contact:
        email: support@budgetpixel.com
        name: BudgetPixel Support
    description: |
        The BudgetPixel developer API for programmatic image, video, music and
        sound-effect generation.

        Generation is **asynchronous**: you create a job, then poll its status until it
        reaches a terminal state (`succeeded` / `failed`). You are charged in credits
        only on success — never for failures, timeouts, or content blocked before
        generation.

        **Authentication.** All requests require an API key sent as a bearer token:

            Authorization: Bearer bpx_live_xxx

        Create and manage keys from your BudgetPixel account dashboard. The developer
        API is available on the **Premium** plan and above.

        **Pricing.** API usage is metered in credits at each model's published price
        (see `GET /v1/models`), and your plan's model discounts and active promotions
        apply to API charges exactly as they do on the web — `POST /v1/cost` quotes
        your discounted price. Pro and Ultra plans include a daily free-models
        allowance (a shared pool of free generations per day across qualified image
        models such as FLUX 2 Klein and Qwen-Image) that covers API
        requests too — the standard price applies once the day's pool is used.
        Other promotional free daily generations remain web/app-only. Failed
        generations are never charged.

        **Rate limits.** Requests are limited per minute: **600 requests/min per API
        key** and **1200 requests/min per source IP** (defaults; subject to tuning).
        Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and
        `X-RateLimit-Reset` (seconds until the window resets). Exceeding a limit
        returns HTTP `429` with a `Retry-After` header — wait that long before
        retrying. Rejected requests still count against the window, so a tight retry
        loop keeps you limited; back off instead. Generation jobs additionally have a
        per-plan concurrency cap (the same one as the web workshop), independent of
        these request limits. `POST /v1/uploads` also has a dedicated **60 uploads/min
        per account** cap (it's free/unmetered) on top of these limits.
    title: BudgetPixel API
    version: "2026-06-20"
openapi: 3.1.0
paths:
    /account/credits:
        get:
            operationId: getCredits
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreditBalance'
                    description: Current credit balance for the account.
                "401":
                    $ref: '#/components/responses/Unauthorized'
            summary: Get credit balance
            tags:
                - Account
    /audios/{job_id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The generated track (or sound effect) is
                returned as a short-lived signed `audio_url` (valid for several hours; re-call
                this endpoint for a fresh URL anytime — the underlying object is deleted 24h
                after generation). Serves every `POST /v1/audios/{model}` job — music and
                sound effects alike.
            operationId: getAudio
            parameters:
                - description: The opaque job id returned by the create endpoint (e.g. `aud_...`).
                  in: path
                  name: job_id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AudioJob'
                    description: Current job status. `audio_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get music job status
            tags:
                - Audios
    /audios/lyria-3:
        post:
            description: |-
                Google Lyria 3 — high-fidelity music from a text prompt, with optional lyrics and up to 10 reference images to condition the mood. MP3 output (SynthID-watermarked).

                **Asynchronous.** Returns a job `id` (the track is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the track URL is in that response's `audio_url`.

                Examples, sample output and pricing: [Lyria 3](https://budgetpixel.com/models/lyria-3)
            operationId: createAudio_lyria_3
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                images:
                                    description: Optional reference images (up to 10) to condition the track's mood/theme. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    items:
                                        type: string
                                    maxItems: 10
                                    type: array
                                    x-bpx-media: image
                                lyrics:
                                    description: Optional lyrics (up to 3000 characters).
                                    type: string
                                prompt:
                                    description: Description of the music to generate (10-2000 characters).
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Lyria 3
            tags:
                - Music
    /audios/mureka-v9:
        post:
            description: |-
                Mureka V9 — songs that sing your exact lyrics (structural tags like [verse]/[chorus] supported) with a vocal gender preference, or instrumental/BGM tracks from a prompt. MP3 output.

                **Asynchronous.** Returns a job `id` (the track is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the track URL is in that response's `audio_url`.

                Examples, sample output and pricing: [Mureka V9](https://budgetpixel.com/models/mureka-v9)
            operationId: createAudio_mureka_v9
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                instrumental:
                                    default: false
                                    description: Generate an instrumental/BGM track from the prompt (no vocals, lyrics ignored).
                                    type: boolean
                                lyrics:
                                    description: Lyrics to sing verbatim (1-5000 characters; [verse]/[chorus]/[bridge] tags supported). Required for songs; ignored for instrumental tracks.
                                    type: string
                                prompt:
                                    description: Style hint (up to 1024 characters). Optional for songs; required for instrumental tracks.
                                    type: string
                                vocal_gender:
                                    default: auto
                                    description: Preferred vocal gender for songs.
                                    enum:
                                        - auto
                                        - female
                                        - male
                                    type: string
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Mureka V9
            tags:
                - Music
    /audios/music-2.6:
        post:
            description: |-
                MiniMax Music 2.6 — full-length songs from a style prompt and/or your own lyrics. Lyrics optimizer can write or polish lyrics from the prompt; instrumental mode skips vocals. MP3 or WAV output.

                **Asynchronous.** Returns a job `id` (the track is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the track URL is in that response's `audio_url`.

                Examples, sample output and pricing: [Music 2.6](https://budgetpixel.com/models/music-2.6)
            operationId: createAudio_music_2_6
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                format:
                                    default: wav
                                    description: Output audio format. Defaults to wav (lossless); choose mp3 for a smaller file.
                                    enum:
                                        - wav
                                        - mp3
                                    type: string
                                instrumental:
                                    default: false
                                    description: Generate an instrumental track (no vocals).
                                    type: boolean
                                lyrics:
                                    description: Lyrics to sing (1-3500 characters). Required unless instrumental is true or lyrics_optimizer is true (the optimizer writes lyrics from the prompt).
                                    type: string
                                lyrics_optimizer:
                                    default: true
                                    description: Let the model write or polish lyrics from the prompt. Default true.
                                    type: boolean
                                prompt:
                                    description: Style/mood description of the track (up to 2000 characters). Optional when lyrics are provided.
                                    type: string
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Music 2.6
            tags:
                - Music
    /audios/music-3.0:
        post:
            description: |-
                MiniMax Music 3.0 — the latest MiniMax music model: full-length songs from a style prompt and/or your own lyrics. Lyrics optimizer can write or polish lyrics from the prompt; instrumental mode skips vocals. WAV or MP3 output.

                **Asynchronous.** Returns a job `id` (the track is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the track URL is in that response's `audio_url`.

                Examples, sample output and pricing: [Music 3.0](https://budgetpixel.com/models/music-3.0)
            operationId: createAudio_music_3_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                format:
                                    default: wav
                                    description: Output audio format. Defaults to wav (lossless); choose mp3 for a smaller file.
                                    enum:
                                        - wav
                                        - mp3
                                    type: string
                                instrumental:
                                    default: false
                                    description: Generate an instrumental track (no vocals).
                                    type: boolean
                                lyrics:
                                    description: Lyrics to sing (1-3500 characters). Required unless instrumental is true or lyrics_optimizer is true (the optimizer writes lyrics from the prompt).
                                    type: string
                                lyrics_optimizer:
                                    default: true
                                    description: Let the model write or polish lyrics from the prompt. Default true.
                                    type: boolean
                                prompt:
                                    description: Style/mood description of the track (up to 2000 characters). Optional when lyrics are provided.
                                    type: string
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Music 3.0
            tags:
                - Music
    /audios/sonilo-music:
        post:
            description: |-
                Sonilo text-to-music — licensed instrumental and background music of an exact length (5-360 seconds) from a text prompt: soundtracks for videos, ads, apps and games. Priced per second of the requested duration with a 10-second minimum (rate in GET /v1/models; POST /v1/cost quotes the exact price). MP3 or WAV output.

                **Asynchronous.** Returns a job `id` (the track is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the track URL is in that response's `audio_url`. Charged per second of the requested `duration` (10-second minimum; rate in `GET /v1/models`) on success only; `POST /v1/cost` quotes the exact price.

                Examples, sample output and pricing: [Sonilo Music](https://budgetpixel.com/models/sonilo-music)
            operationId: createAudio_sonilo_music
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                duration:
                                    default: 30
                                    description: Length of the track in seconds (5-360). Billed per second with a 10-second minimum.
                                    maximum: 360
                                    minimum: 5
                                    type: integer
                                format:
                                    default: mp3
                                    description: Output audio format.
                                    enum:
                                        - mp3
                                        - wav
                                    type: string
                                prompt:
                                    description: Description of the music (up to 2000 characters; even a few words work), e.g. "30 seconds of upbeat electronic instrumental for a product launch video, no vocals".
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Sonilo Music
            tags:
                - Music
    /audios/sonilo-sfx:
        post:
            description: |-
                Sonilo text-to-sound-effect — Foley, ambience, UI sounds, transitions, impacts and action effects from a short description, 1-180 seconds long. Priced per second of the requested duration with a 3-second minimum (see GET /v1/models for the rate; POST /v1/cost quotes the exact price). MP3 or WAV output.

                **Asynchronous.** Returns a job `id` (the sound effect is not in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the clip URL is in that response's `audio_url`. Charged per second of the requested `duration` (3-second minimum; rate in `GET /v1/models`) on success only; `POST /v1/cost` quotes the exact price.

                Examples, sample output and pricing: [Sonilo SFX](https://budgetpixel.com/models/sonilo-sfx)
            operationId: createAudio_sonilo_sfx
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                duration:
                                    default: 10
                                    description: Length of the effect in seconds (1-180). Billed per second with a 3-second minimum.
                                    maximum: 180
                                    minimum: 1
                                    type: integer
                                format:
                                    default: mp3
                                    description: Output audio format.
                                    enum:
                                        - mp3
                                        - wav
                                    type: string
                                prompt:
                                    description: Description of the sound effect (up to 1000 characters), e.g. "heavy rain on a tin roof with distant thunder".
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate sound effect with Sonilo SFX
            tags:
                - Sound Effects
    /audios/sonilo-video-music:
        post:
            description: |-
                Sonilo video-to-music — a licensed soundtrack composed for an input video (up to 6 minutes): the music follows the clip's content, pacing and mood. Returns the music track (`audio_url`, MP3 or WAV) sized to the video. Priced per second of the input video's measured duration (whole seconds, 10-second minimum) — see GET /v1/models for the rate.

                **Asynchronous.** Returns a job `id` (nothing is generated yet in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the soundtrack is that response's `audio_url`, sized to the input video. Charged per second of the input video's measured duration (whole seconds, 10-second minimum; rate in `GET /v1/models`) on success only.

                Examples, sample output and pricing: [Sonilo Video Music](https://budgetpixel.com/models/sonilo-video-music)
            operationId: createAudio_sonilo_video_music
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                format:
                                    default: mp3
                                    description: Output audio format.
                                    enum:
                                        - mp3
                                        - wav
                                    type: string
                                prompt:
                                    description: 'Optional direction for the music (up to 2000 characters): genre, mood, instrumentation, business context — e.g. "warm acoustic indie, builds gently, no vocals".'
                                    type: string
                                video:
                                    description: The input video (MP4/WebM, up to 360 seconds, 30 MB remote-fetch cap). A public video URL, an uploaded-file URL from POST /v1/uploads, a data URI, or raw base64. Its duration is measured server-side and is the billing basis.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - video
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate music with Sonilo Video Music
            tags:
                - Music
    /audios/sonilo-video-sfx:
        post:
            description: |-
                Sonilo video-to-sound-effect — frame-accurate Foley, ambience, impacts and action sounds synced to the visible events of an input video (up to 6 minutes). Returns the SFX track (`audio_url`, MP3 or WAV) and the video with the effects mixed in (`video_url`). Priced per second of the input video's measured duration (whole seconds, 3-second minimum) — see GET /v1/models for the rate.

                **Asynchronous.** Returns a job `id` (nothing is generated yet in this response). Poll [`GET /v1/audios/{id}`](/api-reference/audios/get-music-job-status) until `status` is `succeeded` — the SFX track is that response's `audio_url` and the input video with the effects mixed in is its `video_url`. Charged per second of the input video's measured duration (whole seconds, 3-second minimum; rate in `GET /v1/models`) on success only.

                Examples, sample output and pricing: [Sonilo Video SFX](https://budgetpixel.com/models/sonilo-video-sfx)
            operationId: createAudio_sonilo_video_sfx
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                format:
                                    default: mp3
                                    description: Output audio format of the SFX track.
                                    enum:
                                        - mp3
                                        - wav
                                    type: string
                                prompt:
                                    description: Optional direction for the sound design (up to 1000 characters), e.g. "realistic Foley and ambience, no music".
                                    type: string
                                video:
                                    description: The input video (MP4/WebM, up to 360 seconds, 30 MB remote-fetch cap). A public video URL, an uploaded-file URL from POST /v1/uploads, a data URI, or raw base64. Its duration is measured server-side and is the billing basis.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - video
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateAudioResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate sound effect with Sonilo Video SFX
            tags:
                - Sound Effects
    /classifications/music-genre:
        post:
            description: |
                Classify one song into BudgetPixel's canonical music genre taxonomy —
                the same classifier that powers the site's music gallery. **Synchronous**:
                the response carries the genre plus style/mood tags and a confidence score.

                **Input**: one song (`audio`), max **20 MB** and **7 minutes**, as MP3, WAV,
                OGG, M4A, or FLAC. Accepts a public URL, an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media), a data URI, or
                raw base64. Tip: a 7-minute WAV exceeds 20 MB — use MP3 for long tracks.

                The classifier listens to a ~30-second excerpt sampled from ~25% into the
                track (the `clip` field in the response tells you the exact window). Only
                that excerpt is retained — privately, for ~1 day — never the full upload.

                **Pricing: flat 10 credits per song.** Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "music-genre"}`. Charged on success only — a classifier failure
                costs nothing.
            operationId: classifyMusicGenre
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                audio:
                                    description: One song (public URL, uploaded-file URL, data URI, or raw base64). Max 20 MB and 7 minutes. MP3/WAV/OGG/M4A/FLAC.
                                    type: string
                            required:
                                - audio
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                properties:
                                    clip:
                                        description: The excerpt the classifier heard.
                                        properties:
                                            duration_seconds:
                                                type: number
                                            start_seconds:
                                                type: number
                                        type: object
                                    confidence:
                                        description: Classifier confidence, 0-1.
                                        type: number
                                    credits_charged:
                                        type: integer
                                    genre:
                                        description: Canonical genre, e.g. `Electronic & Dance`. One of the site's music genres.
                                        type: string
                                    genre_slug:
                                        description: URL-safe slug of the genre, e.g. `electronic-and-dance`.
                                        type: string
                                    id:
                                        description: Classification request id (audit reference).
                                        type: string
                                    mood:
                                        description: One short mood phrase.
                                        type: string
                                    tags:
                                        description: 3-6 style/mood/instrument tags.
                                        items:
                                            type: string
                                        type: array
                                type: object
                    description: The classification.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits.
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Classify a song's music genre
            tags:
                - Classification
    /convert/audio:
        post:
            description: |
                Convert audio to `mp3`, `wav`, `ogg`, or `m4a`. **Synchronous** — the converted
                file's download URL is in the response.

                **Pricing: 3 credits per conversion**, charged only on success. Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "convert-audio"}`.

                `file` accepts a public URL (up to 30 MB), an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media), a data URI, or raw
                base64. Input limit 30 MB. Results are stored privately and deleted after 7 days.
            operationId: convertAudio
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                file:
                                    description: The audio to convert — public URL, uploaded-file URL, data URI, or raw base64.
                                    type: string
                                target:
                                    description: Output format.
                                    enum:
                                        - mp3
                                        - wav
                                        - ogg
                                        - m4a
                                    type: string
                            required:
                                - file
                                - target
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ConvertResponse'
                    description: Converted. Download from `url` (valid several hours; file kept 7 days).
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits for this conversion.
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Convert an audio file
            tags:
                - Conversions
    /convert/image:
        post:
            description: |
                Convert an image to `png`, `jpg`, `webp`, or `gif`. **Synchronous** — the converted
                file's download URL is in the response (no job to poll).

                **Pricing: 2 credits per conversion**, charged only on success. Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "convert-image"}`.

                `file` accepts a public URL (up to 30 MB), an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media), a data URI, or raw
                base64. Input limit 20 MB. Results are stored privately and deleted after 7 days.
            operationId: convertImage
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                file:
                                    description: The image to convert — public URL, uploaded-file URL, data URI, or raw base64.
                                    type: string
                                target:
                                    description: Output format.
                                    enum:
                                        - png
                                        - jpg
                                        - webp
                                        - gif
                                    type: string
                            required:
                                - file
                                - target
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ConvertResponse'
                    description: Converted. Download from `url` (valid several hours; file kept 7 days).
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits for this conversion.
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Convert an image
            tags:
                - Conversions
    /convert/video:
        post:
            description: |
                Convert a video to `mp4`, `webm`, `mov`, or `gif` (video→gif is palette-optimized).
                An animated GIF input converts to any video target (gif→mp4). **Synchronous** — the
                converted file's download URL is in the response.

                **Pricing: 10 credits per conversion**, charged only on success. Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "convert-video"}`.

                `file` accepts a public URL (up to 30 MB), an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media) (up to 50 MB), a data
                URI, or raw base64. **Videos must be 30 seconds or shorter.** Results are stored
                privately and deleted after 7 days.
            operationId: convertVideo
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                file:
                                    description: The video (or animated GIF) to convert — public URL, uploaded-file URL, data URI, or raw base64.
                                    type: string
                                target:
                                    description: Output format.
                                    enum:
                                        - mp4
                                        - webm
                                        - mov
                                        - gif
                                    type: string
                            required:
                                - file
                                - target
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ConvertResponse'
                    description: Converted. Download from `url` (valid several hours; file kept 7 days).
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits for this conversion.
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Convert a video
            tags:
                - Conversions
    /cost:
        post:
            description: |
                Returns the credit cost of a generation request **without running it**. Send the same
                body you'd send to the generate endpoint, plus `model`.

                The cost is computed by the same logic that bills you, so it can't disagree with the
                invoice. `exact` is `true` for deterministic pricing. For seedream's sequential mode
                (the model chooses how many images, up to `max_images`) `credits` is the ceiling we
                reserve and `exact` is `false` — the real charge is always ≤ it. Failed jobs cost
                nothing, so you're never charged more than `credits`.
            operationId: estimateCost
            requestBody:
                content:
                    application/json:
                        example:
                            length_seconds: 5
                            model: seedance-2.0
                            resolution: 1080p
                        schema:
                            additionalProperties: true
                            properties:
                                model:
                                    description: The model slug (image or video), e.g. `seedance-2.0`.
                                    type: string
                            required:
                                - model
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CostEstimate'
                    description: The estimated cost.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Estimate the cost of a request
            tags:
                - Models
    /images/{job_id}:
        get:
            description: |
                Poll until `status` is `succeeded`. Generated images are returned as
                short-lived signed URLs (valid for several hours; re-call this endpoint for a
                fresh URL anytime — the underlying objects are deleted 24h after generation).
            operationId: getImage
            parameters:
                - description: The opaque job id returned by the create endpoint (e.g. `img_...`).
                  in: path
                  name: job_id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ImageJob'
                    description: Current job status. `images` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get image job status
            tags:
                - Images
    /images/flux-1.1-pro:
        post:
            description: |-
                Black Forest Labs FLUX 1.1 Pro — fast, high-quality generation with enhanced prompt adherence. Text-to-image and single-image editing.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [FLUX 1.1 Pro](https://budgetpixel.com/models/flux-1.1-pro)
            operationId: createImage_flux_1_1_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "5:4"
                                        - "4:5"
                                    type: string
                                image:
                                    description: Optional image-to-image input. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    type: string
                                    x-bpx-media: image
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with FLUX 1.1 Pro
            tags:
                - Black Forest Labs
    /images/flux-2-dev:
        post:
            description: |-
                Black Forest Labs FLUX 2 Dev — next-generation FLUX quality with multi-reference image editing (up to 4 reference images) and seed control.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [FLUX 2 Dev](https://budgetpixel.com/models/flux-2-dev)
            operationId: createImage_flux_2_dev
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "9:16"
                                        - "16:9"
                                        - "2:3"
                                        - "3:2"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 4) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 4
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with FLUX 2 Dev
            tags:
                - Black Forest Labs
    /images/flux-2-klein:
        post:
            description: |-
                Black Forest Labs FLUX.2 Klein — sub-second generation with excellent prompt adherence. Text-to-image and image editing with up to 3 reference images, megapixel-based resolution, and seed control.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [FLUX 2 Klein](https://budgetpixel.com/models/flux-2-klein)
            operationId: createImage_flux_2_klein
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - "9:21"
                                        - "5:4"
                                        - "4:5"
                                        - match_input_image
                                    type: string
                                megapixel:
                                    default: 1
                                    description: Output resolution in megapixels.
                                    enum:
                                        - 0.5
                                        - 1
                                        - 2
                                        - 4
                                    type: number
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the first reference's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with FLUX 2 Klein
            tags:
                - Black Forest Labs
    /images/flux-2-pro:
        post:
            description: |-
                Black Forest Labs FLUX 2 Pro — premium quality with megapixel-based resolution and seed control.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [FLUX 2 Pro](https://budgetpixel.com/models/flux-2-pro)
            operationId: createImage_flux_2_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "9:16"
                                        - "16:9"
                                        - "2:3"
                                        - "3:2"
                                    type: string
                                image:
                                    description: Optional image-to-image input. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    type: string
                                    x-bpx-media: image
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 1MP
                                    description: Output resolution (megapixels).
                                    enum:
                                        - 0.5MP
                                        - 1MP
                                        - 2MP
                                        - 4MP
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with FLUX 2 Pro
            tags:
                - Black Forest Labs
    /images/gpt-image-2:
        post:
            description: |-
                OpenAI GPT-Image-2 — next-generation image model with significantly improved text rendering. Text-to-image and image editing with up to 9 reference images, 1K/2K/4K output, and three quality levels. Billing: per image, resolution × quality — medium quality bills 60/120/180 credits at 1K/2K/4K, low bills half that (30/60/90), high bills 250/500/750.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [GPT-Image-2](https://budgetpixel.com/models/gpt-image-2)
            operationId: createImage_gpt_image_2
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "5:4"
                                        - "4:5"
                                        - "16:9"
                                        - "9:16"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - "9:21"
                                        - "2:1"
                                        - "1:2"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                output_format:
                                    default: png
                                    description: Output image format.
                                    enum:
                                        - png
                                        - jpeg
                                    type: string
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                quality:
                                    default: medium
                                    description: 'Rendering quality. Multiplies the resolution price: low = 0.5x, medium = 1x, high ≈ 4.17x (e.g. at 1K: low 30, medium 60, high 250 credits).'
                                    enum:
                                        - low
                                        - medium
                                        - high
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 1K
                                    description: Output resolution tier. Bills 60/120/180 credits per image (medium quality) at 1K/2K/4K.
                                    enum:
                                        - 1K
                                        - 2K
                                        - 4K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with GPT-Image-2
            tags:
                - OpenAI
    /images/grok-imagine-image:
        post:
            description: |-
                xAI Grok Imagine — image generation with strong aesthetics and instruction-based image editing from up to 3 reference images. Flat 35 credits per image at 1K or 2K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Grok Imagine](https://budgetpixel.com/models/grok-imagine-image)
            operationId: createImage_grok_imagine_image
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "2:1"
                                        - "1:2"
                                        - auto
                                        - match_input_image
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" (or "auto") to let the model follow the input.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                size:
                                    default: 1K
                                    description: Output resolution tier. Both tiers bill the same 35 credits per image.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Grok Imagine
            tags:
                - xAI
    /images/grok-imagine-image-2:
        post:
            description: |-
                xAI Grok Imagine 2.0 — the latest Grok image model: precise editing, infographics, ads, game assets, UI/UX mockups and storyboards. Text-to-image, plus editing from a single input image (the input image is free). Billing: per image, quality × resolution — low 1K = 50, low 2K = 80, medium 1K = 80, medium 2K = 100 credits. Use POST /v1/cost for an exact quote.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Grok Imagine 2.0](https://budgetpixel.com/models/grok-imagine-image-2)
            operationId: createImage_grok_imagine_image_2
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio. Ignored when `image` is supplied — an edit always matches the input image's frame.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "2:1"
                                        - "1:2"
                                        - auto
                                    type: string
                                image:
                                    description: Optional input image to edit (one only — this model has no multi-reference form). Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Costs nothing extra.
                                    type: string
                                    x-bpx-media: image
                                num_images:
                                    default: 1
                                    description: Number of images to generate. This model returns a single image per request.
                                    maximum: 1
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate, or the edit to apply when `image` is supplied.
                                    type: string
                                quality:
                                    default: low
                                    description: 'Rendering quality. Combines with `size` to set the price: low bills 50 (1K) / 80 (2K), medium bills 80 (1K) / 100 (2K). This model has no `high` tier.'
                                    enum:
                                        - low
                                        - medium
                                    type: string
                                size:
                                    default: 1K
                                    description: 'Output resolution tier. Combines with `quality` to set the price: 1K bills 50 credits at low quality and 80 at medium.'
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Grok Imagine 2.0
            tags:
                - xAI
    /images/kling-v3:
        post:
            description: |-
                Kling AI v3 — image generation with strong prompt adherence and aesthetics. Text-to-image and single-reference-image generation at 1K/2K. Billing: 35 credits per image.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Kling v3](https://budgetpixel.com/models/kling-v3)
            operationId: createImage_kling_v3
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                    type: string
                                image:
                                    description: Optional reference image the generation should follow (subject/feature reference). Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    type: string
                                    x-bpx-media: image
                                negative_prompt:
                                    description: What to avoid in the generated image. Text-to-image only — ignored when "image" is provided.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                size:
                                    default: 2K
                                    description: Output resolution tier.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Kling v3
            tags:
                - Kling
    /images/kling-v3-omni:
        post:
            description: |-
                Kling AI v3 Omni — unified text-to-image and image editing with multi-reference composition from up to 9 reference images and up to 4K output. Billing: 35 credits per image at 1K/2K, 60 at 4K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Kling v3 Omni](https://budgetpixel.com/models/kling-v3-omni)
            operationId: createImage_kling_v3_omni
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                size:
                                    default: 2K
                                    description: Output resolution tier. 1K/2K bill 35 credits per image; 4K bills 60.
                                    enum:
                                        - 1K
                                        - 2K
                                        - 4K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Kling v3 Omni
            tags:
                - Kling
    /images/muse-image-1.0:
        post:
            description: |-
                Meta Muse Image 1.0 — agentic image generation: the model can ground your prompt with web and image search and run code for charts, tables and text layouts before rendering (all included). Excellent typography and factual accuracy, ~2K output. Text-to-image, image editing, and multi-reference composition from up to 4 input images. Flat 12 credits per image.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Muse Image 1.0](https://budgetpixel.com/models/muse-image-1.0)
            operationId: createImage_muse_image_1_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "2:1"
                                        - "1:2"
                                        - match_input_image
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                output_format:
                                    default: webp
                                    description: Output image format.
                                    enum:
                                        - webp
                                        - png
                                        - jpeg
                                    type: string
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                quality:
                                    default: high
                                    description: Reasoning strength. "high" (default) refines the image over multiple passes and uses the model's search grounding fully — better output, slower. "low" responds faster. Both bill the same 12 credits per image.
                                    enum:
                                        - high
                                        - low
                                    type: string
                                reference_images:
                                    description: Optional input images (up to 4) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. An edit follows the input image's frame unless aspect_ratio forces one.
                                    items:
                                        type: string
                                    maxItems: 4
                                    type: array
                                    x-bpx-media: image
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Muse Image 1.0
            tags:
                - Meta
    /images/nano-banana-2:
        post:
            description: |-
                Google Nano Banana 2 (Gemini 3.1 Flash Image) — high-efficiency text-to-image and image editing with multi-reference composition from up to 9 reference images and 0.5K-4K output. Billing: 65 credits per image at 1K (default); 50 at 0.5K, 100 at 2K, 150 at 4K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Nano Banana 2](https://budgetpixel.com/models/nano-banana-2)
            operationId: createImage_nano_banana_2
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "2:3"
                                        - "3:2"
                                        - "3:4"
                                        - "4:3"
                                        - "4:5"
                                        - "5:4"
                                        - "9:16"
                                        - "16:9"
                                        - "21:9"
                                        - "1:4"
                                        - "4:1"
                                        - "1:8"
                                        - "8:1"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                size:
                                    default: 1K
                                    description: Output resolution tier. 1K bills 65 credits per image; 0.5K bills 50, 2K bills 100, 4K bills 150.
                                    enum:
                                        - 0.5K
                                        - 1K
                                        - 2K
                                        - 4K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Nano Banana 2
            tags:
                - Google
    /images/nano-banana-2-lite:
        post:
            description: |-
                Google Nano Banana 2 Lite — budget Nano Banana 2: fast text-to-image and image editing with multi-reference composition from up to 14 reference images. Fixed 1K output at a flat 40 credits per image.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Nano Banana 2 Lite](https://budgetpixel.com/models/nano-banana-2-lite)
            operationId: createImage_nano_banana_2_lite
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "2:3"
                                        - "3:2"
                                        - "3:4"
                                        - "4:3"
                                        - "4:5"
                                        - "5:4"
                                        - "9:16"
                                        - "16:9"
                                        - "21:9"
                                        - "1:4"
                                        - "4:1"
                                        - "1:8"
                                        - "8:1"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 14) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 14
                                    type: array
                                    x-bpx-media: image
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Nano Banana 2 Lite
            tags:
                - Google
    /images/nano-banana-pro:
        post:
            description: |-
                Google Nano Banana Pro (Gemini 3 Pro Image) — professional asset production with advanced reasoning, precise instruction-based editing, and multi-reference composition from up to 9 reference images. Billing: 120 credits per image at 1K/2K, 180 at 4K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Nano Banana Pro](https://budgetpixel.com/models/nano-banana-pro)
            operationId: createImage_nano_banana_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "2:3"
                                        - "3:2"
                                        - "3:4"
                                        - "4:3"
                                        - "4:5"
                                        - "5:4"
                                        - "9:16"
                                        - "16:9"
                                        - "21:9"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                size:
                                    default: 2K
                                    description: Output resolution tier. 1K/2K bill 120 credits per image; 4K bills 180.
                                    enum:
                                        - 1K
                                        - 2K
                                        - 4K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Nano Banana Pro
            tags:
                - Google
    /images/p-image:
        post:
            description: |-
                Pruna AI P-Image — an optimised Qwen-based text-to-image model generating 1-megapixel images in about a second. Built for rapid iteration at very low cost.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [P-Image](https://budgetpixel.com/models/p-image)
            operationId: createImage_p_image
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate. This model returns a single image per request.
                                    maximum: 1
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate. The model automatically enhances prompts for better results.
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with P-Image
            tags:
                - Pruna AI
    /images/p-image-edit:
        post:
            description: |-
                Pruna AI P-Image Edit — an optimised Qwen-based image editing model taking up to 3 reference images. Fast multi-image editing for composition, style transfer, and object manipulation. Refer to inputs as "image 1", "image 2" in the prompt.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [P-Image Edit](https://budgetpixel.com/models/p-image-edit)
            operationId: createImage_p_image_edit
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: match_input_image
                                    description: Output aspect ratio. Defaults to matching the first reference image.
                                    enum:
                                        - match_input_image
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate. This model returns a single image per request.
                                    maximum: 1
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text instruction describing the desired edit or composition.
                                    type: string
                                reference_images:
                                    description: Reference images to edit or compose (1-3). Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                                - reference_images
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with P-Image Edit
            tags:
                - Pruna AI
    /images/qwen-image:
        post:
            description: |-
                Alibaba Qwen-Image — best-in-class complex text rendering and typography. Text-to-image with seed control.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Qwen-Image](https://budgetpixel.com/models/qwen-image)
            operationId: createImage_qwen_image
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "21:9"
                                        - "9:21"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Qwen-Image
            tags:
                - Alibaba
    /images/qwen-image-2.0:
        post:
            description: |-
                Alibaba Qwen Image 2.0 — fast unified generation and editing with strong text rendering and multi-image fusion from up to 3 reference images.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Qwen Image 2.0](https://budgetpixel.com/models/qwen-image-2.0)
            operationId: createImage_qwen_image_2_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                negative_prompt:
                                    description: What to avoid in the generated image.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing and multi-image fusion. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 1.5K
                                    description: Output resolution tier.
                                    enum:
                                        - 1K
                                        - 1.5K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Qwen Image 2.0
            tags:
                - Alibaba
    /images/qwen-image-2.0-pro:
        post:
            description: |-
                Alibaba Qwen Image 2.0 Pro — premium generation with enhanced text rendering, fine-grained realism, and stronger semantic adherence. Multi-image fusion from up to 3 reference images.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Qwen Image 2.0 Pro](https://budgetpixel.com/models/qwen-image-2.0-pro)
            operationId: createImage_qwen_image_2_0_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                negative_prompt:
                                    description: What to avoid in the generated image.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing and multi-image fusion. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 1.5K
                                    description: Output resolution tier.
                                    enum:
                                        - 1K
                                        - 1.5K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Qwen Image 2.0 Pro
            tags:
                - Alibaba
    /images/qwen-image-3.0:
        post:
            description: |-
                Alibaba Qwen Image 3.0 — unified generation and editing balancing quality and speed, with multi-image fusion from up to 3 reference images. Billing: 40 credits per image at 1K, 45 at 2K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Qwen Image 3.0](https://budgetpixel.com/models/qwen-image-3.0)
            operationId: createImage_qwen_image_3_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                negative_prompt:
                                    description: What to avoid in the generated image.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing and multi-image fusion. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 1K
                                    description: Output resolution tier. 1K bills 40 credits per image; 2K bills 45.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Qwen Image 3.0
            tags:
                - Alibaba
    /images/qwen-image-3.0-pro:
        post:
            description: |-
                Alibaba Qwen Image 3.0 Pro — professional infographics, exquisite photorealism, and stronger prompt adherence. Multi-image fusion from up to 3 reference images. Billing: 45 credits per image at 1K, 85 at 2K.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Qwen Image 3.0 Pro](https://budgetpixel.com/models/qwen-image-3.0-pro)
            operationId: createImage_qwen_image_3_0_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                negative_prompt:
                                    description: What to avoid in the generated image.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 3) for image editing and multi-image fusion. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 1K
                                    description: Output resolution tier. 1K bills 45 credits per image; 2K bills 85.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Qwen Image 3.0 Pro
            tags:
                - Alibaba
    /images/seedream-4.5:
        post:
            description: |-
                ByteDance SeeDream 4.5 — text-to-image, plus image editing and multi-reference composition from up to 9 reference images. Strong aesthetics, 2K/4K output.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [SeeDream 4.5](https://budgetpixel.com/models/seedream-4.5)
            operationId: createImage_seedream_4_5
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "16:9"
                                        - "9:16"
                                        - "2:3"
                                        - "3:2"
                                        - "21:9"
                                        - "9:21"
                                    type: string
                                max_images:
                                    default: 1
                                    description: 'Ceiling for grouped generation when sequential_image_generation is "auto": the model returns up to this many related images and decides the exact count (not guaranteed to be exactly this many). You are billed per image returned.'
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                sequential_image_generation:
                                    default: disabled
                                    description: Set to "auto" to return a group of related images (up to max_images); "disabled" (default) returns a single image.
                                    enum:
                                        - disabled
                                        - auto
                                    type: string
                                size:
                                    default: 2K
                                    description: Output resolution.
                                    enum:
                                        - 2K
                                        - 4K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with SeeDream 4.5
            tags:
                - Bytedance
    /images/seedream-5.0-lite:
        post:
            description: |-
                ByteDance SeeDream 5.0 Lite — fast unified text-to-image and image editing with multi-reference composition from up to 9 reference images, 2K/3K output, and grouped sequential generation.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [SeeDream 5.0 Lite](https://budgetpixel.com/models/seedream-5.0-lite)
            operationId: createImage_seedream_5_0_lite
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "16:9"
                                        - "9:16"
                                        - "2:3"
                                        - "3:2"
                                        - "21:9"
                                        - "9:21"
                                    type: string
                                max_images:
                                    default: 1
                                    description: 'Ceiling for grouped generation when sequential_image_generation is "auto": the model returns up to this many related images and decides the exact count (not guaranteed to be exactly this many). You are billed per image returned.'
                                    maximum: 14
                                    minimum: 1
                                    type: integer
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                sequential_image_generation:
                                    default: disabled
                                    description: Set to "auto" to return a group of related images (up to max_images); "disabled" (default) returns a single image.
                                    enum:
                                        - disabled
                                        - auto
                                    type: string
                                size:
                                    default: 2K
                                    description: Output resolution.
                                    enum:
                                        - 2K
                                        - 3K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with SeeDream 5.0 Lite
            tags:
                - Bytedance
    /images/seedream-5.0-pro:
        post:
            description: |-
                ByteDance SeeDream 5.0 Pro — precise image editing with full layer control. Text-to-image, instruction-based editing, and multi-reference composition from up to 9 reference images with 1K/2K output. Billing: 55 credits per image at 1K, 110 at 2K; input images bill 5 credits each after the first (first is free). No grouped/sequential generation.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [SeeDream 5.0 Pro](https://budgetpixel.com/models/seedream-5.0-pro)
            operationId: createImage_seedream_5_0_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "16:9"
                                        - "9:16"
                                        - "2:3"
                                        - "3:2"
                                        - "21:9"
                                        - "9:21"
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. The first input image is free; each additional one bills 5 credits per generated image.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                size:
                                    default: 1K
                                    description: Output resolution. 1K bills 55 credits per image; 2K bills 110.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with SeeDream 5.0 Pro
            tags:
                - Bytedance
    /images/wan-2.7:
        post:
            description: |-
                Alibaba Wan 2.7 — image generation and editing with thinking mode, multi-reference composition from up to 9 reference images, and up to 2K output.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Wan 2.7](https://budgetpixel.com/models/wan-2.7)
            operationId: createImage_wan_2_7
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 2K
                                    description: Output resolution tier.
                                    enum:
                                        - 1K
                                        - 2K
                                    type: string
                                thinking_mode:
                                    description: Enable the model's thinking mode for stronger prompt planning. Text-to-image only — ignored when reference images are provided.
                                    type: boolean
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Wan 2.7
            tags:
                - Alibaba
    /images/wan-2.7-pro:
        post:
            description: |-
                Alibaba Wan 2.7 Pro — professional edition of Wan 2.7 with 4K output support, thinking mode, and multi-reference composition from up to 9 reference images.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Wan 2.7 Pro](https://budgetpixel.com/models/wan-2.7-pro)
            operationId: createImage_wan_2_7_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - match_input_image
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the input's aspect ratio.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                                size:
                                    default: 2K
                                    description: Output resolution tier. 4K applies to text-to-image only — with reference images the output falls back to 2K.
                                    enum:
                                        - 1K
                                        - 2K
                                        - 4K
                                    type: string
                                thinking_mode:
                                    description: Enable the model's thinking mode for stronger prompt planning. Text-to-image only — ignored when reference images are provided.
                                    type: boolean
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Wan 2.7 Pro
            tags:
                - Alibaba
    /images/z-image-turbo:
        post:
            description: |-
                Tongyi-MAI Z-Image-Turbo — ultra-fast 6B-parameter text-to-image with only 9 inference steps. Supports negative prompt and seed control.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/images/{id}`](/api-reference/images/get-image-job-status) until `status` is `succeeded` — the generated image URLs are in that response's `images` array (each `{ url, position }`).

                Examples, sample output and pricing: [Z-Image-Turbo](https://budgetpixel.com/models/z-image-turbo)
            operationId: createImage_z_image_turbo
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "1:1"
                                    description: Output aspect ratio.
                                    enum:
                                        - "1:1"
                                        - "16:9"
                                        - "9:16"
                                        - "4:3"
                                        - "3:4"
                                        - "3:2"
                                        - "2:3"
                                        - "21:9"
                                        - "9:21"
                                    type: string
                                negative_prompt:
                                    description: What to avoid in the generated image.
                                    type: string
                                num_images:
                                    default: 1
                                    description: Number of images to generate.
                                    maximum: 4
                                    minimum: 1
                                    type: integer
                                prompt:
                                    description: Text description of the image to generate.
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateImageResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate image with Z-Image-Turbo
            tags:
                - Alibaba
    /lip-sync/{id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The generated video is returned as a
                short-lived signed `video_url` (valid for several hours; re-call for a fresh
                URL anytime — the underlying object is deleted 24h after generation).
            operationId: getLipSyncJob
            parameters:
                - description: The opaque job id returned by the create endpoint (e.g. `lip_...`).
                  in: path
                  name: id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LipSyncJob'
                    description: Current job status. `video_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get lip sync job status
            tags:
                - Lip Sync
    /lip-sync/omni-human-1.5:
        post:
            description: |-
                BytePlus OmniHuman 1.5 — animates the person (or character/pet) in an image to speak the input audio with synchronized lips, facial expression, and body motion. Priced per second of the input audio, rounded UP to whole seconds (135 credits/second — e.g. a 12.4s clip bills as 13s).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/lip-sync/{id}`](/api-reference/lip-sync/get-lip-sync-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [OmniHuman 1.5](https://budgetpixel.com/models/omni-human-1.5)
            operationId: createLipSync_omni_human_1_5
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                audio:
                                    description: The speech/audio to lip-sync (mp3/wav, up to 60 seconds, max 5 MB). A public audio URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    type: string
                                    x-bpx-media: audio
                                image:
                                    description: The subject to animate — a human face/portrait, character, or pet. A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. jpg/png/webp.
                                    type: string
                                    x-bpx-media: image
                                output_resolution:
                                    default: 1080
                                    description: Output resolution (same price for both).
                                    enum:
                                        - 720
                                        - 1080
                                    type: integer
                                prompt:
                                    description: Optional text prompt to guide the animation style or actions.
                                    type: string
                            required:
                                - image
                                - audio
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateMotionResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Lip sync with OmniHuman 1.5
            tags:
                - Lip Sync
    /lip-sync/p-video-avatar:
        post:
            description: |-
                P-Video Avatar — a talking avatar from one image and a speech clip. Priced per second of the input audio, rounded UP to whole seconds, by output resolution: 40 credits/second at 720p, 60 credits/second at 1080p (e.g. a 12.4s clip at 1080p bills as 13s x 60).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/lip-sync/{id}`](/api-reference/lip-sync/get-lip-sync-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [P-Video Avatar](https://budgetpixel.com/models/p-video-avatar)
            operationId: createLipSync_p_video_avatar
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                audio:
                                    description: The speech/audio to lip-sync (mp3/wav, up to 30 seconds, max 5 MB). A public audio URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    type: string
                                    x-bpx-media: audio
                                image:
                                    description: The avatar image (a person facing the camera works best). A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. jpg/png/webp.
                                    type: string
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution — sets the per-second price (720p = 40, 1080p = 60 credits/second).
                                    enum:
                                        - 720p
                                        - 1080p
                                    type: string
                                video_prompt:
                                    description: Optional visual prompt describing how the person should appear or behave while speaking.
                                    type: string
                            required:
                                - image
                                - audio
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateMotionResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Lip sync with P-Video Avatar
            tags:
                - Lip Sync
    /models:
        get:
            description: Returns the models available via the API, with pricing.
            operationId: listModels
            parameters:
                - description: Filter by model type.
                  in: query
                  name: type
                  required: false
                  schema:
                    enum:
                        - image
                        - video
                        - audio
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                properties:
                                    data:
                                        items:
                                            $ref: '#/components/schemas/Model'
                                        type: array
                                type: object
                    description: The list of available models.
                "401":
                    $ref: '#/components/responses/Unauthorized'
            summary: List available models
            tags:
                - Models
    /moderations/csam:
        post:
            description: |
                Check text, images, and/or one video for child sexual abuse material (CSAM),
                using the same child-safety classifier and rubric BudgetPixel runs on all
                platform content. **Synchronous**: the response carries a boolean verdict,
                a confidence score, and a short reason.

                **Inputs, formats, and size caps** are identical to
                [`POST /v1/moderations/nsfw`](/api-reference/moderation/rate-content-nsfw-level):
                `prompt`, up to 10 `images` (10 MB each), one `video` (100 MB / 5 minutes,
                5 frames sampled). At least one input is required.

                **Pricing: 2 credits base + 3 per image + 15 for a video.** Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "moderation-csam", "images": 2}`. Charged on success only.

                **Child-safety notice:** submitted media is retained privately for ~1 day.
                Content our classifier flags as suspected CSAM is **preserved and escalated
                for human review**, and confirmed material is reported to the relevant
                authorities (e.g. NCMEC) with the submitting account actioned. Do not submit
                content you believe is real CSAM — report it to law enforcement instead.
            operationId: moderateCSAM
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                images:
                                    description: Up to 10 images (public URL, uploaded-file URL, data URI, or raw base64). Max 10 MB each.
                                    items:
                                        type: string
                                    maxItems: 10
                                    type: array
                                prompt:
                                    description: Text to check (alone, or as context for the media).
                                    type: string
                                video:
                                    description: One video (public URL, uploaded-file URL, data URI, or raw base64). Max 100 MB and 5 minutes.
                                    type: string
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                properties:
                                    confidence:
                                        description: Classifier confidence, 0-1.
                                        type: number
                                    credits_charged:
                                        type: integer
                                    csam:
                                        description: True when the submission is judged to be CSAM.
                                        type: boolean
                                    id:
                                        description: Moderation request id (audit reference).
                                        type: string
                                    reason:
                                        description: Short explanation (never a detailed description of the content).
                                        type: string
                                type: object
                    description: The verdict.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits.
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Check content for CSAM
            tags:
                - Moderation
    /moderations/nsfw:
        post:
            description: |
                Rate text, images, and/or one video on BudgetPixel's 4-level NSFW scale —
                the same classifier and scale the platform itself moderates with.
                **Synchronous**: the response carries the verdict.

                **Levels:**
                - `0` (`sfw`) — safe for work. Non-sexual violence, action, and blood stay here.
                - `1` (`teen`) — mildly suggestive (swimwear/underwear in a non-sexual context).
                - `2` (`mature`) — partial nudity or overtly sexual posing, no genitals.
                - `3` (`x-rated`) — explicit sexual content, visible genitals, or extreme gore.

                **Inputs** (at least one required): `prompt` (text), `images` (up to 10, max 10 MB
                each), `video` (one, max 100 MB and 5 minutes — 5 frames are sampled). Media
                values accept a public URL, an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media), a data URI, or raw
                base64. Everything is downscaled before classification; the rating is for the
                submission **as a whole** (highest applicable level), with one overall `reason`.

                **Pricing: 2 credits base + 3 per image + 15 for a video.** Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "moderation-nsfw", "images": 2, "video": true}`. Charged on success
                only — a classifier failure costs nothing.

                Submitted media is retained privately for ~1 day (for abuse review), then
                deleted automatically.
            operationId: moderateNSFW
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                images:
                                    description: Up to 10 images (public URL, uploaded-file URL, data URI, or raw base64). Max 10 MB each.
                                    items:
                                        type: string
                                    maxItems: 10
                                    type: array
                                prompt:
                                    description: Text to rate (alone, or as context for the media).
                                    type: string
                                video:
                                    description: One video (public URL, uploaded-file URL, data URI, or raw base64). Max 100 MB and 5 minutes.
                                    type: string
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                properties:
                                    confidence:
                                        description: Classifier confidence, 0-1.
                                        type: number
                                    credits_charged:
                                        type: integer
                                    id:
                                        description: Moderation request id (audit reference).
                                        type: string
                                    label:
                                        enum:
                                            - sfw
                                            - teen
                                            - mature
                                            - x-rated
                                        type: string
                                    level:
                                        description: Overall NSFW level of the submission.
                                        enum:
                                            - 0
                                            - 1
                                            - 2
                                            - 3
                                        type: integer
                                    reason:
                                        description: Short overall explanation.
                                        type: string
                                type: object
                    description: The rating.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits.
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Rate content NSFW level
            tags:
                - Moderation
    /motion-control/{id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The generated video is returned as a
                short-lived signed `video_url` (valid for several hours; re-call for a fresh
                URL anytime — the underlying object is deleted 24h after generation).
            operationId: getMotionControlJob
            parameters:
                - description: The opaque job id returned by the create endpoint (e.g. `mtn_...`).
                  in: path
                  name: id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MotionJob'
                    description: Current job status. `video_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get motion control job status
            tags:
                - Motion Control
    /motion-control/dreamactor-m2.0:
        post:
            description: |-
                BytePlus DreamActor M2.0 — drives the character in an image to replicate the motion, facial expressions, and lip movements from a reference video, preserving the subject and background of the image. Works for real people, animation, and pets. 720p MP4 output. Priced per second of the reference video (50 credits/second).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/motion-control/{id}`](/api-reference/motion-control/get-motion-control-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [DreamActor M2.0](https://budgetpixel.com/models/dreamactor-m2.0)
            operationId: createMotion_dreamactor_m2_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                image:
                                    description: Character image to animate (the subject). A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. jpg/png, max 4.7 MB; 480x480 to 1920x1080 (larger images are scaled down).
                                    type: string
                                    x-bpx-media: image
                                trim_intro:
                                    default: true
                                    description: Trim the 1-second transition at the start of the output video.
                                    type: boolean
                                video:
                                    description: Motion reference video whose movement drives the character. A public video URL or an uploaded-file URL from POST /v1/uploads. mp4/webm, 3-30 seconds, up to 30 MB.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - image
                                - video
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateMotionResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Motion control with DreamActor M2.0
            tags:
                - Motion Control
    /motion-control/kling-3-motion-control-std:
        post:
            description: |-
                Kling 3.0 motion control (standard tier) — transfers the motion from a reference video onto a character image. Priced per second of the reference video (130 credits/second).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/motion-control/{id}`](/api-reference/motion-control/get-motion-control-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling 3.0 Motion Control Standard](https://budgetpixel.com/models/kling-3-motion-control-std)
            operationId: createMotion_kling_3_motion_control_std
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                character_orientation:
                                    default: video
                                    description: Take the character's orientation from the reference video or from the image. With "image", the reference video must be 10 seconds or less.
                                    enum:
                                        - video
                                        - image
                                    type: string
                                image:
                                    description: Character image to animate. A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. jpg/png/webp.
                                    type: string
                                    x-bpx-media: image
                                keep_original_sound:
                                    default: true
                                    description: Keep the original audio from the reference video.
                                    type: boolean
                                prompt:
                                    default: Replace the characters in the video with the characters from the image, while strictly maintaining the characters' movements.
                                    description: How the character should be animated.
                                    type: string
                                video:
                                    description: Motion reference video whose movement drives the character. A public video URL or an uploaded-file URL from POST /v1/uploads. mp4/webm, 3-30 seconds (max 10 seconds when character_orientation is "image"), up to 30 MB.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - image
                                - video
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateMotionResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Motion control with Kling 3.0 Motion Control Standard
            tags:
                - Motion Control
    /posts:
        post:
            description: |
                Publish a post to your public BudgetPixel feed — the same posts you create on the
                site, so your local agent can publish on your behalf. **Synchronous**: the response
                carries the live post's `id` and `url`.

                **Pricing: 10 credits per successful post**, charged only on success. Estimate via
                [`POST /v1/cost`](/api-reference/models/estimate-the-cost-of-a-request) with
                `{"model": "create-post"}`.

                **Media composition** (one of):
                - **Images** — 1 to 6 images. Each image can optionally carry `model` and
                  `prompt` generation info, shown on the image's info panel on the post.
                - **Video** — exactly 1 video, optionally with up to 3 accompanying images.
                - **Audio** — exactly 1 audio file (cannot mix with other media). Supports
                  `song_name`, `genre`, `lyrics`, and dedicated `cover_image` art (the cover is
                  NOT a media item — pass it in its own field).

                Each `media[].file` accepts a public URL, an uploaded-file URL from
                [`POST /v1/uploads`](/api-reference/files/upload-input-media), a data URI, or raw
                base64. **Size limits:** images 15 MB; audio 50 MB; video 100 MB — note that URL
                inputs are fetched with a 30 MB cap and uploads support up to 50 MB, so ~50 MB is
                the practical video ceiling via the API.

                **Limits & moderation:**
                - The API allows **5 posts per hour**, inside the site-wide limit of **20 posts
                  per hour** per account across all surfaces (shares included) — both on top of
                  the API's global rate limits. Exceeding any of them returns `429`.
                - Posting a byte-identical file you've already posted returns `409` with the
                  existing post's id.
                - Posts published through the API carry a public **"via API"** label, like posts
                  made with an Ava companion carry hers.
                - Image/video posts are **reviewed after publishing** (content rating and spam
                  scoring). Feed and gallery visibility follow that review and your account
                  standing; a post hidden by review is not refunded.
            operationId: createPost
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                content:
                                    description: Optional caption (max 2000 characters).
                                    type: string
                                cover_image:
                                    description: Audio posts only — cover art for the track (a public URL, an uploaded-file URL, a data URI, or raw base64; image, max 15 MB). Passed as its own field, never as a `media` item (audio posts can't mix media).
                                    type: string
                                genre:
                                    description: Audio posts only — one of the site's canonical music genres (exact match). Omit to have the genre classified automatically after publishing.
                                    enum:
                                        - Pop
                                        - Rock
                                        - Hip-Hop & Rap
                                        - R&B & Soul
                                        - Electronic & Dance
                                        - Lo-fi & Chill
                                        - Ambient
                                        - Jazz
                                        - Classical
                                        - Country
                                        - Folk & Acoustic
                                        - Metal
                                        - Blues
                                        - Latin
                                        - K-Pop & J-Pop
                                        - Reggae
                                        - Soundtrack & Cinematic
                                        - Other
                                    type: string
                                lyrics:
                                    description: Audio posts only.
                                    type: string
                                media:
                                    description: 'The post''s media items, in display order. One of: 1-6 images; OR exactly 1 video plus up to 3 images; OR exactly 1 audio file (audio can''t mix with other media).'
                                    items:
                                        properties:
                                            file:
                                                description: Public URL, uploaded-file URL, data URI, or raw base64.
                                                type: string
                                            model:
                                                description: Images only — the model that generated this image, shown on the image's info panel (e.g. `seedream-5.0-pro`).
                                                maxLength: 100
                                                type: string
                                            prompt:
                                                description: Images only — the prompt that generated this image, shown on the image's info panel.
                                                maxLength: 10000
                                                type: string
                                            type:
                                                description: Optional declared kind — validated against the file's actual content.
                                                enum:
                                                    - image
                                                    - video
                                                    - audio
                                                type: string
                                        required:
                                            - file
                                        type: object
                                    maxItems: 6
                                    minItems: 1
                                    type: array
                                song_name:
                                    description: Audio posts only — track title.
                                    type: string
                            required:
                                - media
                            type: object
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreatePostResponse'
                    description: Post published.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "402":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Insufficient credits to publish.
                "403":
                    $ref: '#/components/responses/Forbidden'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Duplicate media — you already posted a byte-identical file.
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Publish a post
            tags:
                - Social
    /uploads:
        post:
            description: |
                Upload an image, video, or audio file to use as input for a generation (e.g. the
                `image` param on an image-to-image or image-to-video request). Returns a
                short-lived `url` you pass as that media parameter.

                Files are ephemeral — stored privately and deleted ~24h after upload. Max 50 MB.

                You don't have to upload first: any media param also accepts a public image URL, a
                data URI, or raw base64 directly. Uploading is the convenient path when you have a
                local file and no public URL to point at.

                **Rate limit.** This endpoint is free (not metered), so it carries a dedicated cap
                of **60 uploads/min per account** (a rolling window), on top of the global per-key
                and per-IP request limits. Exceeding it returns `429` with a `Retry-After` header.
            operationId: uploadMedia
            requestBody:
                content:
                    multipart/form-data:
                        schema:
                            properties:
                                file:
                                    description: The media file. Image (PNG/JPEG/WebP/GIF), video (MP4/WebM), or audio (MP3/WAV/OGG).
                                    format: binary
                                    type: string
                            required:
                                - file
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadResponse'
                    description: Stored. Pass `url` as a media param on a generation request.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "413":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: File exceeds the size limit.
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: Unsupported file type.
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Upload input media
            tags:
                - Uploads
    /upscales/{id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The upscaled image is returned as a
                short-lived signed `image_url` (valid for several hours; re-call for a fresh
                URL anytime — the underlying object is deleted 24h after generation).
            operationId: getUpscaleJob
            parameters:
                - description: The opaque job id returned by the create endpoint.
                  in: path
                  name: id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpscaleJob'
                    description: Current job status. `image_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get upscale job status
            tags:
                - Upscaling
    /upscales/clarity-upscaler:
        post:
            description: |-
                Clarity Upscaler — creative AI upscaling that can add detail as it enlarges, steered by creativity/resemblance controls and an optional guiding prompt. 30 credits per image (typically ~60 seconds).

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/upscales/{id}`](/api-reference/upscaling/get-upscale-job-status) until `status` is `succeeded` — the image URL is in that response's `image_url`.

                Examples, sample output and pricing: [Clarity Upscaler](https://budgetpixel.com/models/clarity-upscaler)
            operationId: createUpscale_clarity_upscaler
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                creativity:
                                    default: 0.35
                                    description: How much new detail the model may invent (0.3-0.9 recommended).
                                    type: number
                                dynamic:
                                    default: 6
                                    description: HDR effect strength (3-9 for best results).
                                    type: number
                                image:
                                    description: Image to upscale. A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    type: string
                                    x-bpx-media: image
                                prompt:
                                    description: Optional guiding prompt describing the image content — helps the model invent plausible detail.
                                    type: string
                                resemblance:
                                    default: 0.6
                                    description: How closely the result must match the input (0-3).
                                    type: number
                                scale_factor:
                                    default: 2
                                    description: Upscale factor (2 or 4).
                                    type: number
                                seed:
                                    description: Seed for reproducible results. Omit for random.
                                    type: integer
                            required:
                                - image
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateUpscaleResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Upscale an image with Clarity Upscaler
            tags:
                - Upscaling
    /upscales/p-image-upscale:
        post:
            description: |-
                Pruna AI P-Image Upscale — fast image upscaling with results in seconds, up to 32 MP output. Priced by the target resolution tier: 4 MP = 10, 8 MP = 15, 16 MP = 30, 32 MP = 60 credits per image.

                **Asynchronous.** Returns a job `id` (the image is not in this response). Poll [`GET /v1/upscales/{id}`](/api-reference/upscaling/get-upscale-job-status) until `status` is `succeeded` — the image URL is in that response's `image_url`.

                Examples, sample output and pricing: [P-Image Upscale](https://budgetpixel.com/models/p-image-upscale)
            operationId: createUpscale_p_image_upscale
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                enhance_details:
                                    default: false
                                    description: Enhance textures and fine detail (may increase contrast).
                                    type: boolean
                                enhance_realism:
                                    default: false
                                    description: Improve realism — recommended for AI-generated images.
                                    type: boolean
                                image:
                                    description: Image to upscale. A public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    type: string
                                    x-bpx-media: image
                                output_format:
                                    default: jpg
                                    description: Output format (jpg recommended; png files get very large at high megapixel targets).
                                    enum:
                                        - jpg
                                        - png
                                        - webp
                                    type: string
                                target:
                                    default: 4
                                    description: 'Target output resolution in megapixels. Sets the price: 4 MP = 10, 8 MP = 15, 16 MP = 30, 32 MP = 60 credits.'
                                    enum:
                                        - 4
                                        - 8
                                        - 16
                                        - 32
                                    type: integer
                            required:
                                - image
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateUpscaleResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Upscale an image with P-Image Upscale
            tags:
                - Upscaling
    /video-upscales/{id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The upscaled video is returned as a
                short-lived signed `video_url` (valid for several hours; re-call for a fresh
                URL anytime — the underlying object is deleted 24h after generation).
            operationId: getVideoUpscaleJob
            parameters:
                - description: The opaque job id returned by the create endpoint.
                  in: path
                  name: id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MotionJob'
                    description: Current job status. `video_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get video upscale job status
            tags:
                - Upscaling
    /video-upscales/topazlabs-video-upscale:
        post:
            description: |-
                Topaz Labs professional-grade AI video upscaling to 1080p or 4K at 30 or 60 fps. Priced per second of the INPUT video by target tier: 1080p30 = 15, 1080p60 = 30, 4K30 = 60, 4K60 = 120 credits/second (input up to 20 seconds, ≤100MB).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/video-upscales/{id}`](/api-reference/upscaling/get-video-upscale-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Topaz Labs Video Upscale](https://budgetpixel.com/models/topazlabs-video-upscale)
            operationId: createVideoUpscale_topazlabs_video_upscale
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                target_fps:
                                    default: 30
                                    description: Target frame rate. 60 fps doubles the per-second rate.
                                    enum:
                                        - 30
                                        - 60
                                    type: integer
                                target_resolution:
                                    default: 1080p
                                    description: Target output resolution. Sets the per-second rate together with target_fps.
                                    enum:
                                        - 1080p
                                        - 4k
                                    type: string
                                video:
                                    description: The video to upscale (up to 20 seconds, MP4/MOV/WebM, ≤100MB). A public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined).
                                    type: string
                                    x-bpx-media: video
                            required:
                                - video
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateMotionResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Upscale a video with Topaz Labs Video Upscale
            tags:
                - Upscaling
    /videos/{job_id}:
        get:
            description: |
                Poll until `status` is `succeeded`. The generated video is returned as a
                short-lived signed `video_url` (valid for several hours; re-call for a fresh
                URL anytime — the underlying object is deleted 24h after generation).
            operationId: getVideo
            parameters:
                - description: The opaque job id returned by the create endpoint.
                  in: path
                  name: job_id
                  required: true
                  schema:
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VideoJob'
                    description: Current job status. `video_url` is populated once succeeded.
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "404":
                    $ref: '#/components/responses/NotFound'
            summary: Get video job status
            tags:
                - Videos
    /videos/happyhorse-1.1:
        post:
            description: |-
                Alibaba HappyHorse 1.1 — highly realistic dynamic rendering. Text-to-video; image-to-video (start frame only); and reference-images-to-video (up to 9 images for subject-consistent generation). 720p or 1080p, priced per resolution (see `resolution_pricing` in GET /v1/models); 4–15 seconds. Audio is determined by the model (no toggle). No video-edit mode.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [HappyHorse 1.1](https://budgetpixel.com/models/happyhorse-1.1)
            operationId: createVideo_happyhorse_1_1
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                    type: string
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with `reference_images`.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (4–15).
                                    maximum: 15
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_images:
                                    description: Optional reference images (1–9) for subject-consistent reference-to-video. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image` (the start frame).
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 720p
                                        - 1080p
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with HappyHorse 1.1
            tags:
                - Alibaba
    /videos/kling-3.0-turbo:
        post:
            description: |-
                Kuaishou Kling 3.0 Turbo — fast text-to-video and image-to-video (start frame only) with native audio always included. 720p or 1080p, priced per resolution (see `resolution_pricing` in GET /v1/models). Any duration from 3 to 15 seconds.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling 3.0 Turbo](https://budgetpixel.com/models/kling-3.0-turbo)
            operationId: createVideo_kling_3_0_turbo
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (3–15).
                                    maximum: 15
                                    minimum: 3
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 720p
                                        - 1080p
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling 3.0 Turbo
            tags:
                - Kling
    /videos/kling-v2.6-pro:
        post:
            description: |-
                Kuaishou Kling v2.6 Pro — text-to-video, plus image-to-video with a start frame and an optional end frame. Optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling v2.6 Pro](https://budgetpixel.com/models/kling-v2.6-pro)
            operationId: createVideo_kling_v2_6_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds.
                                    enum:
                                        - 5
                                        - 10
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling v2.6 Pro
            tags:
                - Kling
    /videos/kling-v3-omni-video:
        post:
            description: |-
                Kuaishou Kling V3 Omni — text-to-video; image-to-video (start + optional end frame); reference-images-to-video (up to 7 images); and video-to-video editing (supply a `video`). 720p / 1080p / 4K, priced per resolution and per audio (see `resolution_pricing` in GET /v1/models and POST /v1/cost). Video-edit carries its own per-second rate and never has audio (the model forces sound off with an input video).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling V3 Omni](https://budgetpixel.com/models/kling-v3-omni-video)
            operationId: createVideo_kling_v3_omni_video
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when an input image or video already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video. Raises the 720p/1080p per-second rate (no price impact at 4K); unavailable on video-edit.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with `reference_images`.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (3–15). For video-edit, set this to the input video's rounded duration.
                                    maximum: 15
                                    minimum: 3
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_images:
                                    description: Optional reference images that guide the generated video. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image` (start/end frames). Up to 7 on their own (reference-images-to-video); up to 4 when accompanying a `video` edit.
                                    items:
                                        type: string
                                    maxItems: 7
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 720p
                                        - 1080p
                                        - 4k
                                    type: string
                                video:
                                    description: 'Optional input video for video-to-video editing. Provide a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). When set, the request runs in video-edit mode: up to 4 `reference_images` may guide the edit, start/end frames are not supported, audio is always off, and the output length matches the input video — set `length_seconds` to the input''s duration rounded to whole seconds (3–15), which is what billing uses.'
                                    type: string
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling V3 Omni
            tags:
                - Kling
    /videos/kling-v3.0-4k:
        post:
            description: |-
                Kuaishou Kling 3.0 at native 4K resolution — text-to-video, plus image-to-video with a start frame and an optional end frame. Any duration from 3 to 15 seconds. Optional audio (no price impact at 4K).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling 3.0 4K](https://budgetpixel.com/models/kling-v3.0-4k)
            operationId: createVideo_kling_v3_0_4k
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video. Raises the per-second rate on Standard/Pro (no price impact at 4K) — estimate via POST /v1/cost.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (3–15).
                                    maximum: 15
                                    minimum: 3
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling 3.0 4K
            tags:
                - Kling
    /videos/kling-v3.0-pro:
        post:
            description: |-
                Kuaishou Kling 3.0 in Professional mode (1080p) — text-to-video, plus image-to-video with a start frame and an optional end frame. Any duration from 3 to 15 seconds. Optional audio (raises the per-second rate — estimate via POST /v1/cost).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling 3.0 Pro](https://budgetpixel.com/models/kling-v3.0-pro)
            operationId: createVideo_kling_v3_0_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video. Raises the per-second rate on Standard/Pro (no price impact at 4K) — estimate via POST /v1/cost.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (3–15).
                                    maximum: 15
                                    minimum: 3
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling 3.0 Pro
            tags:
                - Kling
    /videos/kling-v3.0-standard:
        post:
            description: |-
                Kuaishou Kling 3.0 in Standard mode (720p) — text-to-video, plus image-to-video with a start frame and an optional end frame. Any duration from 3 to 15 seconds. Optional audio (raises the per-second rate — estimate via POST /v1/cost).

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Kling 3.0 Standard](https://budgetpixel.com/models/kling-v3.0-standard)
            operationId: createVideo_kling_v3_0_standard
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video. Raises the per-second rate on Standard/Pro (no price impact at 4K) — estimate via POST /v1/cost.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (3–15).
                                    maximum: 15
                                    minimum: 3
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Kling 3.0 Standard
            tags:
                - Kling
    /videos/minimax-h3:
        post:
            description: |-
                MiniMax H3 — multimodal 2K video. Text-to-video; image-to-video (start + optional end frame); and reference-to-video mixing up to 5 reference images, up to 3 reference video clips (2-15s each, 15s combined — billed per second of INPUT on top of the output, see POST /v1/cost), and up to 3 reference audio clips (15s combined, free). Reference media can't be combined with start/end frames. Any duration from 4 to 15 seconds.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [MiniMax H3](https://budgetpixel.com/models/minimax-h3)
            operationId: createVideo_minimax_h3
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio for text-to-video. Ignored (adaptive) when any image or reference input sets the frame.
                                    enum:
                                        - "21:9"
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with reference media.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Output video length in seconds (4-15).
                                    maximum: 15
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_audios:
                                    description: Optional reference audio clips (up to 3; each 2-15s, 15s combined; WAV/MP3) that guide sound/voice in reference-to-video mode. Each item is a public audio URL or an uploaded-file URL from POST /v1/uploads. Free — no input billing. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: audio
                                reference_images:
                                    description: Optional reference images (up to 5) that guide identity/style in reference-to-video mode. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: image
                                reference_videos:
                                    description: Optional reference video clips (up to 3; each 2-15s, 15s combined; MP4/WebM, ≤30MB each) that guide motion/identity in reference-to-video mode. Each item is a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). Billed at the model's per-second rate on the INPUT duration in addition to the output — estimate via POST /v1/cost. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 3
                                    type: array
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with MiniMax H3
            tags:
                - MiniMax
    /videos/p-video:
        post:
            description: |-
                Pruna AI P-Video — text-to-video; image-to-video with a start frame and an optional end frame; and audio-driven video from a supplied track. 720p or 1080p, 5 or 10 seconds, optional generated audio. Served by our direct Pruna integration.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [P-Video](https://budgetpixel.com/models/p-video)
            operationId: createVideo_p_video
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                    type: string
                                audio:
                                    description: Optional driving-audio track (MP3/WAV/FLAC). Provide a public audio URL or an uploaded-file URL from POST /v1/uploads (passed by URL, not inlined). When supplied, the video's length matches the audio and `length_seconds` is ignored — which changes the per-second charge, so estimate via POST /v1/cost.
                                    type: string
                                    x-bpx-media: audio
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    default: true
                                    description: Keep the model's generated audio in the output (default true; no price impact).
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds. Ignored when `audio` is supplied.
                                    enum:
                                        - 5
                                        - 10
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                resolution:
                                    default: 720p
                                    description: Output resolution.
                                    enum:
                                        - 720p
                                        - 1080p
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with P-Video
            tags:
                - Pruna AI
    /videos/seedance-1.5-pro:
        post:
            description: |-
                ByteDance SeeDance 1.5 Pro — text-to-video, plus image-to-video with a start frame and an optional end frame. Up to 1080p, optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [SeeDance 1.5 Pro](https://budgetpixel.com/models/seedance-1.5-pro)
            operationId: createVideo_seedance_1_5_pro
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "21:9"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds.
                                    enum:
                                        - 5
                                        - 10
                                        - 12
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                resolution:
                                    default: 720p
                                    description: Output resolution.
                                    enum:
                                        - 480p
                                        - 720p
                                        - 1080p
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with SeeDance 1.5 Pro
            tags:
                - ByteDance (SeeDance)
    /videos/seedance-2.0:
        post:
            description: |-
                ByteDance SeeDance 2.0 — text-to-video; image-to-video (start + optional end frame); reference-images-to-video (up to 9 images); and video-to-video editing (supply a `video`). Resolutions 480p–4K, each priced differently (see `resolution_pricing` in GET /v1/models); 4K is for text/image/reference modes, not video-edit. Optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [SeeDance 2.0](https://budgetpixel.com/models/seedance-2.0)
            operationId: createVideo_seedance_2_0
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when an input image or video already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "21:9"
                                    type: string
                                audio:
                                    description: Optional reference audio (MP3/WAV/OGG) for the generated video. Provide a public audio URL or an uploaded-file URL from POST /v1/uploads (passed by URL, not inlined). Must accompany an image (`image` or `reference_images`) or a `video` input — audio can't be the only input.
                                    type: string
                                    x-bpx-media: audio
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (4–15).
                                    maximum: 15
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_images:
                                    description: Optional reference images that guide the generated video. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image` (start/end frames). Up to 9 on their own (reference-images-to-video); may also accompany a `video` to guide a video-edit, in which case up to 6 are used.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                        - 1080p
                                        - 4k
                                    type: string
                                video:
                                    description: Optional input video for video-to-video editing (2-15s, ≤100MB). Provide a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). When set, the request runs in video-edit mode; you may also pass `reference_images` (up to 6) and/or an `audio` track to guide the edit. Not combinable with `image`/`end_image`. Billed on the INPUT duration at half the output per-second rate in addition to the output — estimate via POST /v1/cost.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with SeeDance 2.0
            tags:
                - ByteDance (SeeDance)
    /videos/seedance-2.0-fast:
        post:
            description: |-
                ByteDance SeeDance 2.0 Fast — the same modes as SeeDance 2.0 (text / image / reference / video-to-video) at lower cost and latency. Resolutions 480p and 720p (see `resolution_pricing` in GET /v1/models). Optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [SeeDance 2.0 Fast](https://budgetpixel.com/models/seedance-2.0-fast)
            operationId: createVideo_seedance_2_0_fast
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when an input image or video already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "21:9"
                                    type: string
                                audio:
                                    description: Optional reference audio (MP3/WAV/OGG) for the generated video. Provide a public audio URL or an uploaded-file URL from POST /v1/uploads (passed by URL, not inlined). Must accompany an image (`image` or `reference_images`) or a `video` input — audio can't be the only input.
                                    type: string
                                    x-bpx-media: audio
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (4–15).
                                    maximum: 15
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_images:
                                    description: Optional reference images that guide the generated video. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image` (start/end frames). Up to 9 on their own (reference-images-to-video); may also accompany a `video` to guide a video-edit, in which case up to 6 are used.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                    type: string
                                video:
                                    description: Optional input video for video-to-video editing (2-15s, ≤100MB). Provide a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). When set, the request runs in video-edit mode; you may also pass `reference_images` (up to 6) and/or an `audio` track to guide the edit. Not combinable with `image`/`end_image`. Billed on the INPUT duration at half the output per-second rate in addition to the output — estimate via POST /v1/cost.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with SeeDance 2.0 Fast
            tags:
                - ByteDance (SeeDance)
    /videos/seedance-2.0-mini:
        post:
            description: |-
                ByteDance SeeDance 2.0 Mini — the same modes as SeeDance 2.0 (text / image / reference / video-to-video) at the best cost-performance. Resolutions 480p and 720p (see `resolution_pricing` in GET /v1/models). Optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [SeeDance 2.0 Mini](https://budgetpixel.com/models/seedance-2.0-mini)
            operationId: createVideo_seedance_2_0_mini
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when an input image or video already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "21:9"
                                    type: string
                                audio:
                                    description: Optional reference audio (MP3/WAV/OGG) for the generated video. Provide a public audio URL or an uploaded-file URL from POST /v1/uploads (passed by URL, not inlined). Must accompany an image (`image` or `reference_images`) or a `video` input — audio can't be the only input.
                                    type: string
                                    x-bpx-media: audio
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video.
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds (4–15).
                                    maximum: 15
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_images:
                                    description: Optional reference images that guide the generated video. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image` (start/end frames). Up to 9 on their own (reference-images-to-video); may also accompany a `video` to guide a video-edit, in which case up to 6 are used.
                                    items:
                                        type: string
                                    maxItems: 9
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                    type: string
                                video:
                                    description: Optional input video for video-to-video editing (2-15s, ≤100MB). Provide a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). When set, the request runs in video-edit mode; you may also pass `reference_images` (up to 6) and/or an `audio` track to guide the edit. Not combinable with `image`/`end_image`. Billed on the INPUT duration at half the output per-second rate in addition to the output — estimate via POST /v1/cost.
                                    type: string
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with SeeDance 2.0 Mini
            tags:
                - ByteDance (SeeDance)
    /videos/seedance-2.5:
        post:
            description: |-
                ByteDance SeeDance 2.5 — flagship multimodal video. Text-to-video; image-to-video (start + optional end frame); and reference-to-video mixing up to 15 reference images (free), up to 5 reference video clips (2-15s each, 30s combined — billed per second of INPUT at half the output rate, see POST /v1/cost), and up to 5 reference audio clips (30s combined, free; audio-only input is supported). Video editing and extension are reference-video modes — no separate edit endpoint. Reference media can't be combined with start/end frames. 480p/720p/1080p, any duration 4-30 seconds, optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [SeeDance 2.5](https://budgetpixel.com/models/seedance-2.5)
            operationId: createVideo_seedance_2_5
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio for text-to-video. Ignored (adaptive) when a start frame or any reference media sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                        - "21:9"
                                    type: string
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    description: Generate audio with the video (no price impact).
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with reference media.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Output video length in seconds (4-30).
                                    maximum: 30
                                    minimum: 4
                                    type: integer
                                prompt:
                                    description: Text description of the video.
                                    type: string
                                reference_audios:
                                    description: Optional reference audio clips (up to 5; each 2-15s, 30s combined; WAV/MP3) that guide sound/voice. Audio-only input is supported. Each item is a public audio URL or an uploaded-file URL from POST /v1/uploads. Free — no input billing. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: audio
                                reference_images:
                                    description: Optional reference images (up to 15, free) that guide identity/style in reference-to-video mode. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 15
                                    type: array
                                    x-bpx-media: image
                                reference_videos:
                                    description: Optional reference video clips (up to 5; each 2-15s, 30s combined; MP4/MOV, ≤50MB each) for editing, extension, and motion/identity guidance. Each item is a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). Billed on the INPUT duration at half the output per-second rate (80/sec at 480p, 160/sec at 720p, 375/sec at 1080p) in addition to the output — estimate via POST /v1/cost. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: video
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                        - 1080p
                                    type: string
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with SeeDance 2.5
            tags:
                - ByteDance (SeeDance)
    /videos/wan-2.7-video:
        post:
            description: |-
                Alibaba Wan 2.7 (video) — text-to-video; image-to-video with a start frame and an optional end frame; and video editing (supply a `video`). Prompt-driven narrative, optional generated audio, and an optional driving-audio track. 720p or 1080p, priced per resolution (see `resolution_pricing` in GET /v1/models); 5, 10, or 15 seconds. Video editing instead takes its length from the input clip (`length_seconds` and `aspect_ratio` are ignored) and bills the INPUT duration on top of the output at the same per-second rate — so a 10s clip costs 20 seconds' worth; estimate via POST /v1/cost. (The Wan 2.7 image model is `wan-2.7` under POST /v1/images.)

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Wan 2.7](https://budgetpixel.com/models/wan-2.7-video)
            operationId: createVideo_wan_2_7_video
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: "16:9"
                                    description: Aspect ratio. Ignored when a start image or an input `video` already sets the frame.
                                    enum:
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                    type: string
                                audio:
                                    description: Optional driving-audio track (MP3/WAV/OGG) for the generated video. Provide a public audio URL or an uploaded-file URL from POST /v1/uploads (passed by URL, not inlined). Ignored when `generate_audio` is false.
                                    type: string
                                    x-bpx-media: audio
                                end_image:
                                    description: Optional end frame, used together with `image` (the start frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    default: true
                                    description: Generate audio with the video (default true; no price impact).
                                    type: boolean
                                image:
                                    description: Optional start frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with `video`.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Video length in seconds. Ignored for video editing, which inherits the input clip's length.
                                    enum:
                                        - 5
                                        - 10
                                        - 15
                                    type: integer
                                prompt:
                                    description: Text description of the video, or the edit instruction when `video` is supplied (for example "change the video to an 8-bit pixel style").
                                    type: string
                                reference_images:
                                    description: Optional reference images (up to 4, free) used only with `video` — they guide the edit, for example supplying the person or style to apply to the clip. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.
                                    items:
                                        type: string
                                    maxItems: 4
                                    type: array
                                    x-bpx-media: image
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 720p
                                        - 1080p
                                    type: string
                                video:
                                    description: 'Optional input video to edit (2-15s, MP4/MOV, ≤100MB). Supplying it switches the request to video editing: the model applies `prompt` to this clip. Provide a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). Billed on the INPUT duration at the full per-second rate in addition to the output — estimate via POST /v1/cost. Can''t be combined with `image`/`end_image`.'
                                    type: string
                                    x-bpx-media: video
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Wan 2.7
            tags:
                - Alibaba
    /videos/wan-3.0-video:
        post:
            description: |-
                Alibaba Wan 3.0 — all-in-one video generation up to 30 seconds at 30fps. Text-to-video; image-to-video (first + optional last frame); and reference-to-video mixing up to 10 reference images, up to 5 reference video clips (15s combined) for editing/replication/extension, and up to 5 reference audio clips (15s combined). In reference mode the prompt can address assets by order ("Image 1", "Video 1"). Reference media can't be combined with start/end frames. 480p/720p/1080p, priced per OUTPUT second by resolution (input media is free — see `resolution_pricing` in GET /v1/models); any duration 2-30 seconds (input video + output ≤ 30s); optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Wan 3.0](https://budgetpixel.com/models/wan-3.0-video)
            operationId: createVideo_wan_3_0_video
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: adaptive
                                    description: Aspect ratio, honored in every mode (an explicit ratio reframes the output even with a first frame or reference media). "adaptive" (default) lets the model pick a suitable ratio from the inputs and prompt intent.
                                    enum:
                                        - adaptive
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                    type: string
                                end_image:
                                    description: Optional last frame, used together with `image` (the first frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    default: true
                                    description: Generate audio with the video (default true; no price impact).
                                    type: boolean
                                image:
                                    description: Optional first frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with reference media.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Output video length in seconds (2-30). With reference videos, input duration + output length must not exceed 30 seconds.
                                    maximum: 30
                                    minimum: 2
                                    type: integer
                                prompt:
                                    description: 'Text description of the video, or the edit instruction when reference videos are supplied. In reference mode, address assets by order: "Image 1", "Video 1", "Audio 1".'
                                    type: string
                                reference_audios:
                                    description: Optional reference audio clips (up to 5; each 2-15s, 15s combined; WAV/MP3) that guide sound/voice. Free. Each item is a public audio URL or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: audio
                                reference_images:
                                    description: Optional reference images (up to 10, free) that guide identity/style/scene in reference-to-video mode. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 10
                                    type: array
                                    x-bpx-media: image
                                reference_videos:
                                    description: Optional reference video clips (up to 5; each 2-15s, 15s combined; MP4/MOV, ≤50MB each) for editing, effect/camera replication, and extension. Each item is a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). Free — only OUTPUT seconds are billed — but input video duration + `length_seconds` must not exceed 30. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: video
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                        - 1080p
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Wan 3.0
            tags:
                - Alibaba
    /videos/wan-3.0-video-prime:
        post:
            description: |-
                Alibaba Wan 3.0 Prime — the high-speed tier of Wan 3.0 with significantly faster end-to-end generation and the same all-in-one capabilities: text-to-video; image-to-video (first + optional last frame); and reference-to-video mixing up to 10 reference images, up to 5 reference video clips (15s combined) for editing/replication/extension, and up to 5 reference audio clips (15s combined). Reference media can't be combined with start/end frames. 480p/720p/1080p, priced per OUTPUT second by resolution (input media is free — see `resolution_pricing` in GET /v1/models); any duration 2-30 seconds (input video + output ≤ 30s); optional audio.

                **Asynchronous.** Returns a job `id` (the video is not in this response). Poll [`GET /v1/videos/{id}`](/api-reference/videos/get-video-job-status) until `status` is `succeeded` — the video URL is in that response's `video_url`.

                Examples, sample output and pricing: [Wan 3.0 Prime](https://budgetpixel.com/models/wan-3.0-video-prime)
            operationId: createVideo_wan_3_0_video_prime
            requestBody:
                content:
                    application/json:
                        schema:
                            properties:
                                aspect_ratio:
                                    default: adaptive
                                    description: Aspect ratio, honored in every mode (an explicit ratio reframes the output even with a first frame or reference media). "adaptive" (default) lets the model pick a suitable ratio from the inputs and prompt intent.
                                    enum:
                                        - adaptive
                                        - "16:9"
                                        - "9:16"
                                        - "1:1"
                                        - "4:3"
                                        - "3:4"
                                    type: string
                                end_image:
                                    description: Optional last frame, used together with `image` (the first frame) to interpolate the video between the two frames. Same input forms as `image`.
                                    type: string
                                    x-bpx-media: image
                                generate_audio:
                                    default: true
                                    description: Generate audio with the video (default true; no price impact).
                                    type: boolean
                                image:
                                    description: Optional first frame for image-to-video. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-video. Can't be combined with reference media.
                                    type: string
                                    x-bpx-media: image
                                length_seconds:
                                    default: 5
                                    description: Output video length in seconds (2-30). With reference videos, input duration + output length must not exceed 30 seconds.
                                    maximum: 30
                                    minimum: 2
                                    type: integer
                                prompt:
                                    description: 'Text description of the video, or the edit instruction when reference videos are supplied. In reference mode, address assets by order: "Image 1", "Video 1", "Audio 1".'
                                    type: string
                                reference_audios:
                                    description: Optional reference audio clips (up to 5; each 2-15s, 15s combined; WAV/MP3) that guide sound/voice. Free. Each item is a public audio URL or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: audio
                                reference_images:
                                    description: Optional reference images (up to 10, free) that guide identity/style/scene in reference-to-video mode. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 10
                                    type: array
                                    x-bpx-media: image
                                reference_videos:
                                    description: Optional reference video clips (up to 5; each 2-15s, 15s combined; MP4/MOV, ≤50MB each) for editing, effect/camera replication, and extension. Each item is a public video URL or an uploaded-file URL from POST /v1/uploads (videos are passed by URL, not inlined). Free — only OUTPUT seconds are billed — but input video duration + `length_seconds` must not exceed 30. Can't be combined with `image`/`end_image`.
                                    items:
                                        type: string
                                    maxItems: 5
                                    type: array
                                    x-bpx-media: video
                                resolution:
                                    default: 720p
                                    description: Output resolution. Pricing varies by resolution — see `resolution_pricing` in GET /v1/models.
                                    enum:
                                        - 480p
                                        - 720p
                                        - 1080p
                                    type: string
                                seed:
                                    description: Seed for reproducible generation. Omit for random.
                                    type: integer
                            required:
                                - prompt
                            type: object
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateVideoResponse'
                    description: Job accepted.
                "400":
                    $ref: '#/components/responses/BadRequest'
                "401":
                    $ref: '#/components/responses/Unauthorized'
                "403":
                    $ref: '#/components/responses/Forbidden'
                "429":
                    $ref: '#/components/responses/TooManyRequests'
            summary: Generate video with Wan 3.0 Prime
            tags:
                - Alibaba
security:
    - ApiKeyAuth: []
servers:
    - description: Production
      url: https://api.budgetpixel.com/v1
tags:
    - description: Account and credit balance
      name: Account
    - description: Discover available models and pricing
      name: Models
    - description: Upload input media for image/video generation
      name: Uploads
    - description: Image job status
      name: Images
    - description: FLUX image models
      name: Black Forest Labs
    - description: SeeDream image models
      name: Bytedance
    - description: Video job status
      name: Videos
    - description: Kuaishou Kling video models
      name: Kling
    - description: SeeDance video models
      name: ByteDance (SeeDance)
    - description: Music and sound-effect job status
      name: Audios
    - description: Music generation models
      name: Music
    - description: Text-to-sound-effect models (priced per second)
      name: Sound Effects
    - description: Format conversion for images, video, and audio
      name: Conversions
    - description: Publish posts to your BudgetPixel feed
      name: Social
    - description: Content moderation — NSFW rating and CSAM detection
      name: Moderation
    - description: Content classification — music genre detection
      name: Classification
