Skip to content

API Documentation

neobenedict edited this page May 13, 2022 · 8 revisions


The rayshift API is available at It uses a JSON format. The response is in JSON format for all text-based APIs.

Rate limit

API end points are rate limited. If you exceed this rate limit, you will receive a response such as:

    "status": 429,
    "response": {},
    "message": "rate limit exceeded",
    "wait": 57

You should then wait the number of seconds specified before retrying your request.

Public API Endpoints



Request type: GET

Where region is jp or na, and friendcode is a 9 digit friend code.

Example response:


    "status": 200,
    "response": {
        "lastUpdate": 1595864824,
        "name": "Name",
        "code": "123456789",
        "lastLogin": 1595859008,
        "guid": "b4a791ee-6e80-4297-b95d-0d4caf1fdaf5",
        "decksPresent": [
        "decks": {
            "0": "/static/images/deck-gen/jp/123456789/b4a791ee-6e80-4297-b95d-0d4caf1fdaf5/1/1.png",
            "1": "/static/images/deck-gen/jp/123456789/b4a791ee-6e80-4297-b95d-0d4caf1fdaf5/8/1.png"
    "message": "ok"


    "status": 404,
    "response": {},
    "message": "Friend support not found"
  • decksPresent shows which decks exist (see documentation below)

Image generation

Endpoint:{string region}/{int friendId}/{Guid guid}/{int decksToStack}/{int flags}.png

Request type: GET

As of 15th September 2021, the deck image format has changed. The old format is only supported for older images that were previously generated.

  • region is na or jp only
  • guid is a unique reference to a particular lookup returned by the API.
  • decksToStack should be a bitmask of the decks you want stacking. 1/2/4 = Main Deck 1/2/3, 8/16/32 = Event Deck 1/2/3. Eg 1+8 = 9 will give you the first Main Deck and Event Deck stacked.
  • flags should be a bitmask of the following options:
None = 0,
Transparent = 1,
TemplateOnly = 2,
DisableCustomImages = 4,
HighResolution = 8,
NoCommandCodes = 16

For a transparent, high resolution image with no command codes, you would use 1 + 8 + 16 = 25.

e.g. generates a full 6 deck image (1+2+4+8+16+32=63), with high resolution and transparency (1+8=9), for a JP friend id 123456789 and deck guid 6865c360-1b4b-43c0-b080-0edb5baeea8d.

Private API Endpoints

These API endpoints require authentication. To authenticate, set apiKey=key in your request. To get an API key, you need to apply for one, please PM Neo#8090 on discord with your use application and endpoints you need to access.


This endpoint is used to refresh a player's profile.


Request Type: GET, POST


region: 1 (JP), 2 (NA)
friendId: 9 digit friend ID

Example request:

Response: {"status":200,"response":{},"message":"in queue"}

You should then requery this endpoint every 1-2 seconds until you get a response other than processing or in queue. If you are running a lookup bot, please let us know the IP address for rate limit whitelisting.

  • Status code 503: Server under maintenance
  • Status code 404: User not found
  • Status code 200: Processing / in queue / finished
  • Status code 500: Internal failure

A completed lookup will have message "finished" and return the same response result as the lookup endpoint.

For example:

    "status": 200,
    "response": {
        "lastUpdate": 1595976026,
        "name": "Player Name",
        "code": "123456789",
        "lastLogin": 1595959565,
        "guid": "b4a791ee-6e80-4297-b95d-0d4caf1fdaf5",
        "decks": {
            "0": "/static/images/deck-gen/jp/123456789/b4a791ee-6e80-4297-b95d-0d4caf1fdaf5/1/1.png",
            "1": "/static/images/deck-gen/jp/123456789/b4a791ee-6e80-4297-b95d-0d4caf1fdaf5/8/1.png"
        "time": 1595976021425
    "message": "finished"