Worlds Collide Wiki

Final Fantasy VI Randomizer

User Tools

Site Tools


API


The FF6WC API allows developers to generate seeds, query seed/flag information, and download patch/log files. Access requires an API key and an account on ff6wc.com to link with. API keys should be kept private and may be requested from AtmaTek on Discord.

Generate Seed


Description

Generate a new seed with a given flag string

Endpoint

https://www.ff6wc.com/api/generate

Method

POST

Arguments

{
    "key" : "<API KEY>",
    "flags" : "<FLAGS>",
}

An optional description string may also be provided:

{
    "key" : "<API KEY>",
    "flags" : "<FLAGS>",
    "description" : "<DESCRIPTION>",
}

Returns

{
    "id" : "<SEED ID>",
    "flags_id" : "<FLAGS ID>",
    "version" : "<VERSION>",
    "hash" : "<HASH>"
    "url" : "<SEED URL>",
}

Errors

Error Code Reason
400 Invalid JSON request or missing required argument
401 Invalid or inactive API Key
429 Rate limit exceeded (20/minute, 120/hour, 500/day)
500 Failed to generate seed or calculate limits

Examples

$ curl -X POST -d '{"key" : "<API KEY>", "flags" : "-cg -sl"}' https://www.ff6wc.com/api/generate
{"flags_id":"Wtq78b6JWjly","hash":"Banon, Vargas, Narshe Guard, Fish","id":"24zKw0Vldap6","url":"https://www.ff6wc.com/seed/24zKw0Vldap6","version":"1.0.3"}
$ curl -X POST -d '{"key" : "<API KEY>", "flags" : "-s myseed -cg -sl", "description" : "test description"}' https://www.ff6wc.com/api/generate
{"flags_id":"Wtq78b6JWjly","hash":"Banon, Vargas, Narshe Guard, Fish","id":"QoMGQuoS5Dha","url":"https://www.ff6wc.com/seed/QoMGQuoS5Dha","version":"1.0.3"}
$ curl -X POST -d '{"key" : "<API KEY>"}' https://www.ff6wc.com/api/generate
{"error":"'flags' required"}

Seed Info


Description

Query information about a given seed

Endpoint

https://www.ff6wc.com/api/seed/<API KEY>/<SEED ID>

Method

GET

Returns

{
    "id" : "<SEED ID>",
    "version" : "<VERSION>"
    "flags_id" : "<FLAGS ID>",
    "hash" : "<HASH>",
    "description" : "<DESCRIPTION>",
    "url" : "<SEED URL>",
    "created_at" : "<TIME GMT>",
    "created_by" : "<USERNAME>",
}

Errors

Error Code Reason
401 Invalid or inactive API Key
404 Invalid seed ID

Examples

$ curl -X GET https://www.ff6wc.com/api/seed/<API KEY>/24zKw0Vldap6
{"created_at":"Tue, 25 Jan 2022 09:50:49 GMT","created_by":"TestBot","description":"","flags_id":"Wtq78b6JWjly","hash":"Banon, Vargas, Narshe Guard, Fish","id":"24zKw0Vldap6","url":"https://www.ff6wc.com/seed/24zKw0Vldap6","version":"1.0.3"}
$ curl -X GET https://www.ff6wc.com/api/seed/<API KEY>/null
{"error":"Invalid seed id"}

Flag Info


Description

Query information about given flags

Endpoint

https://www.ff6wc.com/api/flags/<API KEY>/<FLAGS ID>

Method

GET

Returns

{
    "id" : "<FLAGS ID>",
    "flags" : "<FLAGS>"
    "url" : "<FLAGS URL>",
}

Errors

Error Code Reason
401 Invalid or inactive API Key
404 Invalid flags ID

Examples

$ curl -X GET https://www.ff6wc.com/api/flags/<API KEY>/Wtq78b6JWjly
{"flags":"-cg -sl","id":"Wtq78b6JWjly","url":"https://www.ff6wc.com/flags/Wtq78b6JWjly"}
$ curl -X GET https://www.ff6wc.com/api/flags/<API KEY>/null
{"error":"Invalid flags id"}

Patch File


Description

Retrieve binary patch file for given seed

Endpoint

https://www.ff6wc.com/api/patch/<API KEY>/<SEED ID>

Method

GET

Returns

Binary xdelta3 patch file

Errors

Error Code Reason
401 Invalid or inactive API Key
404 Patch file not found
500 Failed to extract patch

Examples

$ curl -X GET https://www.ff6wc.com/api/patch/<API KEY>/24zKw0Vldap6 --output patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 31194  100 31194    0     0   676k      0 --:--:-- --:--:-- --:--:--  676k
$ curl -X GET https://www.ff6wc.com/api/patch/<API KEY>/null
{"error":"Patch file not found"}

Log File


Description

Retrieve text log file for given seed

Endpoint

https://www.ff6wc.com/api/log/<API KEY>/<SEED ID>

Method

GET

Returns

UTF-8 encoded text log file

Errors

Error Code Reason
401 Invalid or inactive API Key
404 Log file not found
500 Failed to extract log

Examples

$ curl -X GET https://www.ff6wc.com/api/log/<API KEY>/24zKw0Vldap6
Version   1.0.3
Generated 2022-01-25 01:50:49
Input     ff6.smc
Output    ff6wc_24zKw0Vldap6.smc
Log       ff6wc_24zKw0Vldap6.txt
Website   ff6wc.com/seed/24zKw0Vldap6
Seed      myseed
Flags     -cg -sl
Hash      Banon, Vargas, Narshe Guard, Fish

...
$ curl -X GET https://www.ff6wc.com/api/log/<API KEY>/null
{"error":"Log file not found"}