NAV Navbar
shell
  • Introduction
  • Authentication
  • /gen Image Generation
  • /filter Filters
  • Errors
  • Introduction

    PhotoBox uses a handful of resources to generate images that suit your needs.

    All examples will use the following:

    For text examples, it will use the phrase this is a great example

    Authentication

    The value of the Authorization header would look like this 123456abcxyz

    All endpoints will use this base for all requests: api.photobox.pw/v1/

    # With shell, you can just pass the correct header with each request
    curl "api_endpoint_here"
      -H "Authorization: 123456abcxyz"
    

    /gen Image Generation

    All endpoints below require the image.gen permission.

    /animeprotest

    Render Time Fast (< 1.5s)
    Permission image.gen.light.animeprotest
    Dimensions 219 x 300

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 100)

    /art

    Render Time Okay (~2s)
    Permission image.gen.light.art
    Dimensions 1364 x 1534

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /changemymind

    Render Time Fast (< 1.5s)
    Permission image.gen.light.changemymind
    Dimensions 800 x 450

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 100)

    /dogbite

    Render Time Fast (< 1.5s)
    Permission image.gen.light.dogbite
    Dimensions 500 x 491

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 30)

    /durv

    Render Time Fast (< 1.5s)
    Permission image.gen.light.durv
    Dimensions 401 x 226

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /eliminated

    Render Time Average (3-5s)
    Permission image.gen.medium.eliminated
    Dimensions > 381 x 70

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 30)
    fire Number? number next to the fire symbol (defaults to a number between 60-100)

    /firstwords

    Render Time Fast (< 1.5s)
    Permission image.gen.light.firstwords
    Dimensions 1024 x 1069

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 100)

    /nickelback

    Render Time Okay (~2s)
    Permission image.gen.light.nickelback
    Dimensions 1024 x 576

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /nutbutton

    Render Time Okay (~2s)
    Permission image.gen.light.nutbutton
    Dimensions 600 x 446

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 30)

    /okbyemom

    Render Time Fast (< 1.5s)
    Permission image.gen.light.okbyemom
    Dimensions 600 x 600

    Body Object

    Property name Type Description
    text String text you want to use in the picture (max length is 30)

    /pornhub

    Render Time Okay (~2s)
    Permission image.gen.light.pornhub
    Dimensions 805 x 628

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference
    title String title of the video (max length is 30)

    /respects

    Render Time Fast (< 1.5s)
    Permission image.gen.light.respects
    Dimensions 960 x 540

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /starvstheforcesof

    Render Time Slow (6-12s)
    Permission image.gen.medium.starvstheforcesof
    Dimensions 1920 x 1080

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /tinder

    Render Time Fast (< 1.5s)
    Permission image.gen.light.tinder
    Dimensions 570 x 738

    Body Object

    Property name Type Description
    pictureOne String URL of the first picture want to reference
    pictureTwo String UL of the second picture want to reference

    /ttt

    Render Time Fast (< 1.5s)
    Permission image.gen.light.ttt
    Dimensions 421 x 269

    Body Object

    Property name Type Description
    title String name to use in the title of the window (max length is 30)
    avatar String url of the avatar
    text String text to use as content of the window (max length is 150)

    /waifu

    Render Time Fast (< 1.5s)
    Permission image.gen.light.waifu
    Dimensions 450 x 340

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference

    /wanted

    Render Time Slow (6-12s)
    Permission image.gen.medium.wanted
    Dimensions 889 x 1200

    Body Object

    Property name Type Description
    picture String URL of the picture you want to reference
    title String name to use in the poster (max length is 30)

    /filter Filters

    All endpoints below require the image.filter permission and use the following body object:

    Property name Type Description
    picture String URL of the picture you want to reference

    /blurple

    Render Time Average (3-5s)
    Permission image.gen.light.blurple



    /deepfry

    Render Time Terrible (> 12s)
    Permission image.gen.light.deepfry



    /distort

    Render Time Terrible (> 12s)
    Permission image.gen.heavy.distort

    The distort endpoint can use special arguments to mold the picture into whatever you like. All arguments in the next table are optional.

    Property name Type Description
    saturate Boolean Saturate or desaturates the image, do not define to not use the filter
    saturateAmount Number The amount to saturate or desaturate the image (Must be between 0 and 80)
    spin Number The amount of hue spin to apply to the image (Must be between 0 and 359)
    implode Number The amount of implosion to apply to the image (Must be between 0 and 10)
    roll Boolean Whether or not to roll the image (This enables verticalRoll and horizontalRoll)
    verticalRoll Boolean The amount of roll to be applied verically (Must be between -180 and 180)
    horizontalRoll Boolean The amount of roll to be applied horizontally (Must be between -180 and 180)
    swirl Boolean The amount of swirl to apply (Must be between -180 and 180)



    /grayscale

    Render Time Fast (< 1.5s)
    Permission image.gen.light.grayscale



    /icey

    Render Time Okay (~2s)
    Permission image.gen.light.icey



    /magik

    Render Time Terrible (> 12s)
    Permission image.gen.heavy.magik



    /sepia

    Render Time Okay (~2s)
    Permission image.gen.light.sepia



    /sharpen

    Render Time Average (3-5s)
    Permission image.gen.light.sharpen



    Errors

    PhotoBox uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- You don't have permission to use this endpoint.
    404 Not Found -- The specified resource could not be found.
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

    Error Types

    Error Type Status Code Meaning
    1 401 - Unauthorized Bad Auth -- Invalid Authentication.
    2 401 - Unauthorized Bad Perms -- You are missing permissions to use the endpoint.
    3 400 - Bad Request Invalid Schema -- The POST body is formatted wrong.
    4 400 - Bad Request Invalid File Type -- A resource you gave responded with the wrong type of content.
    5 400 - Bad Request Resource Error -- A resource you gave has errored.
    1000 400 - Bad Request Invalid Body -- The POST body is formatted wrong.
    1001 500 - Internal Server Error Image Process Error -- The image process has errored while processing the request.