o!rdr API (1)

Download OpenAPI specification:Download

Introduction

Learn how to interact with the o!rdr API in this documentation.
If you plan on using this API, consider getting a key to bypass the rate limit of 1 render request per 5 minutes, and getting a BOT badge on the render list page.
DM "masterioo" on Discord to get one.
When tesing your code against the API and Websocket, please use the dev mode, to not flood o!rdr with useless render requests. It simulates what would happen if you sent a real render request. Check the "Developer mode" section to learn more about it.

Websocket

The o!rdr Websocket can be accessed at https://apis.issou.best/ordr/ws.
It is powered by socket.io! Make sure to use a library that is compatible with socket.io websockets.
Note: most socket.io libraries require you to set the path of the URL (/ordr/ws) in a separate parameter. So the websocket URL is https://apis.issou.best, the path is /ordr/ws.

It sends 4 events:

  • render_added_json: { renderID: number }
  • render_progress_json: { renderID: number, username: string, progress: string, renderer: string, description: string }
  • render_done_json: { renderID: number, videoUrl: string }
  • render_failed_json: { renderID: number, errorCode: number, errorMessage: string }

Check this example in NodeJS to communicate with the Websocket.

Error codes

Since rev12, error codes are sent after every POST request to send a render, and with the render_fail event on the Websocket.

  • 0 = no error

Error codes that can be sent to the render_fail event on the Websocket:

  • 1 = emergency stop (triggered manually)
  • 2 = replay download error (bad upload from the sender)
  • 3 = replay download error (bad download from the server), can happen because of invalid characters
  • 4 = all beatmap mirrors are unavailable
  • 15 = beatmap not found on all the beatmap mirrors
  • 18 = unknown error from the renderer
  • 19 = the renderer cannot download the map
  • 20 = beatmap version on the mirror is not the same as the replay
  • 21 = the replay is corrupted (danser cannot process it)
  • 22 = server-side problem while finalizing the generated video
  • 27 = something with the renderer went wrong: it probably has an unstable internet connection (multiple renders at the same time)
  • 28 = the renderer cannot download the replay

Error codes that can be used before the request has been sent (http code 400/500)

  • 2 = replay parsing error (bad upload from the sender)
  • 5 = replay file corrupted
  • 6 = invalid osu! gamemode (not 0 = std)
  • 7 = the replay has no input data
  • 8 = beatmap does not exist on osu! (probably because of custom difficulty or non-submitted map)
  • 9 = audio for the map is unavailable (because of copyright claim)
  • 10 = cannot connect to osu! api
  • 11 = the replay has the autoplay mod
  • 12 = the replay username has invalid characters
  • 13 = the beatmap is longer than 15 minutes
  • 14 = this player is banned from o!rdr
  • 16 = this IP is banned from o!rdr
  • 17 = this username is banned from o!rdr
  • 23 = server-side problem while preparing the render
  • 24 = the beatmap has no name
  • 25 = the replay is missing input data
  • 26 = the replay has incompatible mods
  • 29 = the replay is already rendering or in queue
  • 30 = the star rating is greater than 20
  • 31 = the mapper is blacklisted
  • 32 = the beatmapset is blacklisted
  • 33 = the replay has already errored less than an hour ago
  • 34 = invalid replay URL or can't download the replay (if replayURL is provided)
  • 35 = a required field is missing (the missing field is shown in the message)
  • 36 = your last replays have a too high error rate (cannot be triggered when you're a verified bot)
  • 37 = the replay username is inappropriate
  • 38 = this skin does not exist
  • 39 = this custom skin does not exist or has been deleted
  • 40 = o!rdr is not ready to take render jobs at the moment
  • 41 = o!rdr is not ready to take render jobs from unauthenticated users at the moment (verified bots are not authenticated users)

Developer mode

This mode is used when testing your code against the API and Websocket to avoid flooding o!rdr with useless render requests.
It simulates what would happen if you sent a real render request. The renderIDs of simulated renders are random and between 1 and 20000.
The websocket used by this mode is the same as the websocket used by o!rdr globally.
To use the dev mode, add a verificationKey key in your form data API request if you do not already have it, and as value you can use:

  • devmode_success: simulates a request that will successfully render a video. Listen to the websocket to get the state of this fake render (render_added, render_progress and render_done are emitted).
  • devmode_fail: simulates a request that will fail on the API level. No websocket events are emitted.
  • devmode_wsfail: simulates a request that will fail on the Websocket level (render_failed event is emitted).

Generate a video download link

When using automated scripts or bots on o!rdr that need to download videos, use this endpoint to generate a temporary download link.

query Parameters
id
required
number

The render ID of the video.

Responses

Response samples

Content type
application/json

Get renders

Default audio codec is AAC, bitrate is 192kbps
See the default video codecs used here

query Parameters
pageSize
number
Examples:
  • pageSize=5 -

The number of renders the query will return you in the page. If not specified, 50 is the default.

page
number
Examples:
  • page=1 -

The page

ordrUsername
string
Examples:
  • ordrUsername=MasterIO -

Search by o!rdr username, can be used at the same time as replayUsername

replayUsername
string
Examples:
  • replayUsername=MasterIO02 -

Search by replay username, can be used at the same time as ordrUsername

renderID
number
Examples:
  • renderID=4337 -

The renderID of a render

nobots
any

Hide bots from the returned render query.

link
string
Examples:
  • link=pov8n -

The path of a shortlink (for example pov8n for https://link.issou.best/pov8n)

beatmapsetid
number
Examples:
  • beatmapsetid=818778 -

Get renders with this specific beatmapset ID

Responses

Response samples

Content type
application/json
{
  • "renders": [
    ],
  • "maxRenders": 1
}

Upload a replay

Remember that when sending a form in post-data format, every value needs to be a string, even booleans!
Boolean values also need to be written in lowercase!
Make sure to enter all required fields in the request!

Request Body schema: multipart/form-data
replayFile
required
object (file)

The replay file

replayURL
string

The replay URL for the server to download, required if there is no replayFile, non-direct links are supported, redirections are handled

username
required
string

The username that will be displayed on o!rdr

resolution
required
string

Can be 720x480 (30fps), 960x540, 1280x720 (60fps)

globalVolume
number

The global volume for the video. Default: 50

musicVolume
number

The music volume for the video. Default: 50

hitsoundVolume
number

The hitsounds volume for the video. Default: 50

showHitErrorMeter
boolean

Show the hit error meter. Default: true

showUnstableRate
boolean

Show the unstable rate, only takes effect if showHitErrorMeter is set to true. Default: true

showScore
boolean

Show the score. Default: true

showHPBar
boolean

Show the HP bar. Default: true

showComboCounter
boolean

Show the combo counter. Default: true

showPPCounter
boolean

Show the PP Counter or not. Default: true

showScoreboard
boolean

Show the scoreboard or not (requires a client that has an osu! api key). Default: false

showBorders
boolean

Show the playfield borders or not. Default: false

showMods
boolean

Show the mods used during the game or not. Default: true

showResultScreen
boolean

Show the result screen or not. Default: true

skin
required
string

The skin to use. Can be the ID of a skin, or its name. If customSkin is true, this is the custom skin ID.

useSkinCursor
boolean

Use the skin cursor or not. If not, danser cursor will be used. Default: true

useSkinColors
boolean

Use the skin combo colors or not. Default: false

useSkinHitsounds
boolean

Use skin hitsounds, if false beatmap hitsounds will be used. Default: true

useBeatmapColors
boolean

Use the beatmap combo colors or not, overrides useSkinColors if true. Default: true

cursorScaleToCS
boolean

Scale cursor to circle size. Does not do anything at the moment. Default: false

cursorRainbow
boolean

Makes the cursor rainbow, only takes effect if useSkinCursor is set to false. Default: false

cursorTrailGlow
boolean

Have a glow with the trail or not. Default: false

drawFollowPoints
boolean

Draw follow points between objects or not. Default: true

scaleToTheBeat
boolean

Scale objects to the beat. Default: false

sliderMerge
boolean

Merge sliders or not. Default: false

objectsRainbow
boolean

Makes the objects rainbow, overrides useSkinColors and useBeatmapColors. Default: false

objectsFlashToTheBeat
boolean

Makes the objects flash to the beat. Default: false

useHitCircleColor
boolean

Makes the slider body have the same color as the hit circles. Default: true

seizureWarning
boolean

Display a 5 second seizure warning before the video. Default: false

loadStoryboard
boolean

Load the background storyboard. Default: true

loadVideo
boolean

Load the background video (loadStoryboard has to be set to true). Default: true

introBGDim
number

Background dim for the intro, in percent, from 0 to 100. Default: 0

inGameBGDim
number

Background dim in game, in percent, from 0 to 100. Default: 75

breakBGDim
number

Background dim in break, in percent, from 0 to 100. Default: 30

BGParallax
boolean

Adds a parallax effect. Default: false

showDanserLogo
boolean

Show danser logo on the intro. Default: true

skip
boolean

Skip the intro or not. Default: true

cursorRipples
boolean

Show cursor ripples when keypress. Default: false

cursorSize
number

Set the cursor size, multiplier from 0.5 to 2. Default: 1

cursorTrail
boolean

Show the cursor trail or not. Default: true

drawComboNumbers
boolean

Show the combo numbers in objects. Default: true

sliderSnakingIn
boolean

Have slider snaking in. Default: true

sliderSnakingOut
boolean

Have slider snaking out. Default: true

verificationKey
string

Your API key if you have any

showHitCounter
boolean

Shows a hit counter (100, 50, miss) below the PP counter. Default: false

showKeyOverlay
boolean

Show the key overlay or not. Default: true

showAvatarsOnScoreboard
boolean

Show avatars on the left of the username of a player on the scoreboard. May break some skins because the width of the scoreboard increases. Default: false

showAimErrorMeter
boolean

Show the Aim Error Meter or not. Default: false.

playNightcoreSamples
boolean

Play nightcore hitsounds or not. Default: true

customSkin
boolean

Set to true to use a custom skin (the id must be in the skin property), or false to use an "official" skin. Default: false

showStrainGraph
boolean

Show the strain graph or not. Default: false

showSliderBreaks
boolean

Show the slider breaks count in the hit counter. Default: false

ignoreFail
boolean

Ignores fail in the replay or not. Default: false

Responses

Response samples

Content type
application/json
{
  • "message": "Render added successfully",
  • "renderID": 95,
  • "errorCode": 0
}

List of available skins

If you have a good skin that is not available, you can send it in the o!rdr Discord server (channel #suggestions) and we'll probably add it!

query Parameters
pageSize
number
Examples:
  • pageSize=5 -

The number of skins the API will return you in the page. If not specified, 100 is the default.

page
number
Examples:
  • page=1 -

The page

search
string
Examples:
  • search=white -

Get the skins that matches the most your string

Responses

Response samples

Content type
application/json
{}

Get a custom skin info

query Parameters
id
required
number

The ID of the custom skin

Responses

Response samples

Content type
application/json
{
  • "found": true,
  • "removed": false,
  • "message": "Found skin",
  • "skinName": "MasterIO's skin v1 fixed",
  • "skinAuthor": "masterio",
}