Skip to content

Methods

getScript

Description

Gets information about a script. That includes the source code, author, team members, last update, etc...

If you pass &source to this method, you can see the script source code in highlighted format as if it was presented to you in a code editor.

Parameters

  • id

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getScript&id=150

getAllScripts

Description

Get all scripts.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getAllScripts

updateScript

Description

This will update a script you own or are a team member of in the database. All 3 parameters must be POST data. The notes parameter must be detailed and descriptive. The Community Guidelines has restrictions about this. Do not write vague information about what you changed in your script.

Parameters

  • script
  • content
  • notes

getMember

Description

Gets information about your membership, including forum information and Session information.

You can pass extra flags as a parameter to display more information:

Flag Information
bans This will expand the steam object that is returned and do a Steam API request to check if your account is VAC or Game banned. It will also tell you how long ago the account was banned in days.
history This will pass a session_history object that will give you the last 10 Sessions you owned, the failures related to it and the successful moments.
scripts This will expand the scripts object that is returned. This will get all the cloud Lua scripts you have enabled on your account. It will pass it like getAllScripts was called except it will only show the scripts you enabled.
private This will hide Steam accounts and Session directory output. This doesn't have practical usage unless you are making a tool that dumps information from this method to be shared publicly. Obviously if you are troubleshooting on the forums, you do not want people to see your Steam accounts and so forth. The fantasy.troubleshooter tool uses this flag.
xp This will show your xp gain/loss history, sorted by time.
rolls This will show your Abundance of Jupiter loot history. This is limited to the last 15 rolls.
fc2t This will show your enabled FC2T projects.
hashes This will show the history of hashes associated with your license.

The following information is returned:

  • username
  • key_link
  • key_stop
  • level
  • protection
  • fid
  • unread_conversations
  • unread_alerts
  • register_date
  • posts
  • score
  • custom_title
  • groups
  • avatar
  • session
  • steam
  • configuration
  • sign
  • xp

The Steam accounts returned will not include accounts you have hidden in your Member's Panel via the hide command. The example below shows all flags being passed and beautifying the results.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getMember&scripts&history&bans&beautify

getMemberAsBuddy

Description

This can only be used by a buddy or VIP. This returns the same results as getMember except for another member. This is used for members in the buddy-system to help troubleshoot new members in private. However, the following restrictions are implemented:

  • Steam accounts are hidden (this is none of a buddy's business - ever).
  • Session directory is hidden (there might be a private name in their path).
  • &bans and &history flags are ignored and cannot be used (same reason about Steam accounts).
  • &scripts is always enabled (so the buddy knows what scripts you enabled on cloud).
  • &beautify is always enabled (readability). You can pass &no_beauty to reverse this.
  • This method does not work on members who aren't level 1 (Veteran and VIP members).

Parameters

  • name

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getMemberAsBuddy&name=johnnyappleseed

toggleScriptStatus

Description

This will toggle a script on/off depending on its current status.

Parameters

  • id

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=toggleScriptStatus&id=130

getSoftware

Description

Gets information of a constelia.ai software. The following information is returned:

  • game
  • version
  • update
  • last_update
  • name
  • vip
  • availability
  • detection
  • protection

If you pass &scripts as a parameter, it will also list all the scripts associated with the software. As an example: Constellation4 has specific scripts that only work on its solution. Therefore if you invoked this method for Constellation4 while passing &scripts, you will get a render of getAllScripts attached to the information already returned.

Parameters

  • name

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getSoftware&name=Constellation4

getAllSoftware

Description

Gets all information of all constelia.ai software.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getAllSoftware

getForumPosts

Description

This will get the latest forum posts depending on the count argument. count can only be between 0 and 20. Posts/Threads that have been deleted will not show up. An array of the following information is returned:

  • id
  • thread
  • title
  • username
  • date
  • message
  • elapsed

Parameters

  • count

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getForumPosts&count=10

getConfiguration

Description

This will get your stored cloud configuration. This method is the only method in the API that does not return JSON data. It will always provide the raw configuration. If you do not have a configuration, the page will be blank. Even if the page is blank, this is still a sign of success. It's just simply the fact you don't have a configuration to show.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getConfiguration

setConfiguration

Description

The value parameter must be POST data. This does a JSON check for you automatically. If this method fails, it will note you of that.

Parameters

  • value

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=setConfiguration (POST: `value`)

resetConfiguration

Description

This will safely delete/reset the cloud configuration of a specific solution

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=resetConfiguration

hideSteamAccount

Description

This will hide a Steam account from appearing in the Member's Panel and in getMember. The account must be the login username.

Parameters

  • name

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=hideSteamAccount&name=mysteamloginusername

showSteamAccount

Description

This will allow a previously hidden Steam account to show in the Member's Panel and in getMember. The account must be the login username.

Parameters

  • name

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=showSteamAccount&name=mysteamloginusername

setKeys

Description

This will set your linking and panic/stop key. You do not need to provide both key_link and key_stop, only one of them is required.

The value must be the virtual key code number you wish to use. Refer to this site for codes. For Linux users, refer to this site.

Parameters

  • link
  • stop

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=setKeys&link=122

getSolution

Description

This method should not be called in your browser as it will likely freeze the tab and eventually crash your browser. This method will get the raw executable for a constelia.ai solution and return it as buffer.

By default, this method will get the Windows version of a solution. IF a Linux version exists, you can request it by adding os=linux.

As mentioned earlier, you should not execute this in your browser. Instead, use curl to do so.

Parameters

  • software
  • os (optional)

Example (Windows)

Text Only
curl -L -o fantasy.universe4.exe "https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getSolution&software=universe4"

Example (Linux)

Text Only
curl -L -o fantasy.universe4.out "https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getSolution&os=linux&software=universe4"

setProtection

Description

This method allows you to set the protection method of the FC2 solution. This means whenever a member decides to launch an FC2 solution, FC2 will automatically change how it interacts with other processes. By default, all members have protection level 2 (kernel mode). The protection parameter must be one of the following codes:

  • 0 = Standard (usermode)
  • 1 = IPC/Zombie
  • 2 = Kernel Mode Protection
  • 3 = Minimum (Usermode)
  • 4 = Minimum (Kernel)

Parameters

  • protection

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=setProtection&protection=1

setMemberScripts

Description

This method allows you to set a handful of scripts on a license key without constantly having to call toggleScriptStatus or toggleScriptStatusByID. You must pass an array of script IDs. See the example on how to do this.

Parameters

  • scripts

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=setMemberScripts&scripts=[140, 141, 142, 146]

getDivinityChart

Description

Gets the divinity chart in JSON format. Passing &top5 will format the leaderboard section into signs.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getDivinityChart

getMinecraftWhitelist

Description

Lists all members who are allowed on the Minecraft community server. This method only works for VIP members and Minecraft server administrators. This will also return the member's XP, level and their license status.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getMinecraftWhitelist

addMinecraftWhitelist

Description

Add/Update a member to the Minecraft community server. Passing &friend will make this method attempt to add the Minecraft login username as a friend rather than the owner.

This method only works for VIP members and Minecraft server administrators.

Parameters

  • name Minecraft login username
  • owner The owner of the account by forum username

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=addMinecraftWhitelist&name=minecraftusername&owner=typedef
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=addMinecraftWhitelist&name=minecraftusername1337&owner=typedef&friend

deleteMinecraftWhitelist

Description

This will remove a member's entry from the whitelist. This will also remove all their friends from the whitelist as well.

This method only works for VIP members and Minecraft server administrators.

Parameters

  • owner The owner of the account by forum username

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=deleteMinecraftWhitelist&owner=typedef

respecPerks

Description

This will remove all perks you have purchased. However, this will come at a cost. Each time you respec your perks, you lose 250 XP. Certain perks do not respec if they are time-based.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=respecPerks

listPerks

Description

This will list all perks in the system.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=listPerks

buyPerk

Description

This will consume a perk point to purchase a perk.

Parameters

  • id Perk ID. See listPerks to get the id.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=buyPerk&id=1

changeVenus

Description

This method is related to the "Venus" perk and will not work unless the perk is obtained through the Divinity Chart. Please see the examples on how to use this method.

Parameters

  • status Shows when you paired with someone and the status of your pairing (pending, no perk, etc)
  • request The name of the member you wish to pair with. Both of you must have the Venus perk. Both members must request one another for this to work.
  • withdraw Withdraws your request or breaks your pairing.

Example (status)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=changeVenus&status

Example (request)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=changeVenus&request=MyBestFriend1337

Example (withdraw)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=changeVenus&withdraw

rollLoot

Description

This method is related to the "Abundance of Jupiter" perk. This is automatically invoked for you by using the side panel or by using /loot with the "Bond Between Human and AI" perk on Discord.

If you pass &sim, you can simulate a roll. However, it will not be counted. This should only be used for testing the system. Alternatively, this can be used for those working on a FC2 project and need help formatting the result for their GUI/Web Page.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=rollLoot

heyConstelia

Description

This method is related to the "Bond Between Human and AI" perk. This method allows you to communicate with Constelia's trained AI. Community Guidelines are strictly applied to this method and all requests are logged. Offensive content or anything that would be inappropriate can ban you from the API if investigated.

Responses are not immediate, as the AI needs to calculate a response to your message. Be patient. This method has a 10-second cooldown.

The AI has been taught the essentials of FC2. She could answer basic questions about this community and the software. She is not perfect. If you find any issues with her responses, report it in the megathread. Although she is trained for basic usage, you should always still consider reading the guides available on the forum.

See example on YouTube (hey_constelia.lua).

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=heyConstelia&message=Hey

teachConstelia

Description

This method requires the perk "Space Engineer". It will allow you to teach Constelia's trained AI custom information. Although the AI is called Constelia and is trained for FC2 related content, it is still open to learn new information. If you read the description of the perk "Space Engineer", you can see why this is useful for you on and off the platform.

data must be sent through a POST request. Without this, you will be told there is a missing parameter. This should be the information you wish Constelia to memorize. If successful, you will get a 200 response code with the data that Constelia will memorize next time you use her.

info and wipe are optional GET parameters. info will simply display the information Constelia memorizes about you (which you taught her). wipe will erase the memory.

Parameters (GET)

  • info
  • wipe

Parameters (POST)

  • data

Example (Teaching)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=teachConstelia (POST: data=I love green apples)

If done correctly, next time you use heyConstelia, she will remember that you love green apples if you prompt her about it (or talk to her about green apples).

Another example:

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=teachConstelia (POST: data=Next time I ask about the weather, remember that I live in Tokyo. Tell me the weather in fahrenheit. When you tell me the weather, give me a 7 day forecast too. Also, whenever I ask about coding, always give me examples in Javascript. I code in snake case, consider that in your examples.)

If done correctly, next time you use heyConstelia, she will give you the next 7 day forecast in Tokyo whenever you ask her about the weather. Furthermore, if you ask her for coding examples, she will always write the code in Javascript with snake case.

Example (Info)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=teachConstelia&info

Example (Wipe)

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=teachConstelia&wipe

getFC2TProjects

Description

Gets all FC2T projects.


getFC2TProject

Description

Gets an FC2T project by its ID.

Parameters

  • id

toggleProjectStatus

Description

Enables/Disables an FC2T project. This is similar to toggleScriptStatus.

Parameters

  • id

setMemberProjects

Description

Enables/Disables multiple FC2T projects. This is similar to setMemberScripts.

Parameters

  • projects

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=setMemberProjects&projects=[1,2]

sendCommand

Description

This method basically allows you to send commands to the Member's Panel and get the result back.

HTML formatting is removed and other formatting is not accounted for. For example: The scripts command in the Member's Panel will return squished and unformatted text. If you pass &style, it will keep the format.

Parameters

  • command

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=sendCommand&command=session

getBuilds

Description

Lists all available builds.

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=getBuilds

createBuild

Description

Creates a new build or updates your current build. The tag will be your forum username. This is the same as the build command in the Member's Panel.

The tag parameter is limited to 16 characters and must only be A-Z, 0-9. If this is not followed, the method will return with an error.

The private parameter accepts a member's username. This is useful if you only want to share your build with a specific member. Keep in mind that if you decide to update your build that is already private, and you do not include the private flag, the build will become unprivate. This flag also prevents your build from showing up on getBuilds.

Parameters

  • tag (optional)
  • private (optional)

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=createBuild

Example (Private + Tag)

This will create a private build with the tag secretbuild and can only be seen by typedef. If you were to drop the &private, then you would simply create a build with the tag that anyone can access.

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=createBuild&tag=secretbuild&private=typedef


deleteBuild

Description

Wipes your current build. This is the same as the build delete command in the Member's Panel.

Parameters

  • tag (optional)

Example

Text Only
https://constelia.ai/api.php?key=ABCD-EFGH-IJKL-MNOP&cmd=deleteBuild