---
title: "Phoenix API"
canonical: "https://documentation.chaos.com/space/PHX4MAYA/125862882/Phoenix%20API"
format: markdown
---
This page provides information on the Chaos Phoenix application programming interface (API).

## **Overview**

---

The Chaos Phoenix API is included with the installation of Phoenix for Autodesk<sup>®</sup> Maya®. It provides C++ API for several different purposes:

- Loading of grid and particle data stored in AUR, VDB or F3D cache files.
- Runtime access to different Phoenix nodes, allowing you to prepare them for rendering on demand, start and stop a simulation, access the parameters of different nodes, load and save presets.
- Access to the Phoenix color gradients and diagram curves, allowing you to embed them in your own application.

 

## ** Installation **

---

Phoenix API is normally installed in the folder *C:\Program Files\Chaos Group\Phoenix FD\Maya NNNN for x64\SDK* where NNNN is the version of Maya (2020, 2019, etc.).

 

## **Structure**

---

The Phoenix API includes the following folders:

- **\include** – Contains the header files needed to interface with Phoenix API.
- **\lib **– Contains the Phoenix API binaries for both static and dynamically linked versions of the Phoenix API.
- **\samples **– Contains example projects that use different functions of the Phoenix API.

 

> Macro (anchor)



## **Using the Phoenix API**

---

The Phoenix API is provided as a static and dynamic library. Depending on your project, you may pick the static or dynamic version of the library. Usually the dynamic version is preferred when there is a dependency to any version of V-Ray SDK, as Phoenix API depends on **vutils_s.lib**.

Using Phoenix API as a static library requires:

- **\lib\aurloader_s.lib** and **\lib\vutils_s.lib **to be added as an additional dependency to the linker.

Using Phoenix API as a dynamic library requires:

- **AURLOADER_DYNAMIC_LIB** to be added the compiler settings as a preprocessor definition.** **
- **\lib\aurloader.lib** to be added as an additional dependency to the linker.
- **\lib\aurloader.dll **to be available at run time to the executable linked to **\lib\aurloader.lib**.

Phoenix API is built with the vc14 **C++ Platform Toolset** for all Maya versions and for both V-Ray Next and V-Ray 5, **with "/MD" Runtime Library flag**.


## **Samples**

---

The Phoenix API comes with two code sample projects: GridView and CSVParticles.

**Prerequisites**:

The project uses CMake for generating project files. Additionally the following third party libraries have been used:

- GLEW ([http://glew.sourceforge.net/](http://glew.sourceforge.net/)).
- GLFW ([http://www.glfw.org/](http://www.glfw.org/)) Tested with GLFW Version 3.0.4.
- Zlib ([http://www.zlib.net/](http://www.zlib.net/)). Needed if static version of Phoenix API is being used.

Here is an archive containing those libraries: [external_libs](https://drive.google.com/file/d/1eOUV7QSjBwwCWMnA1J-p2GNshBBYtwCl/view?usp=drive_link)

**Note**: This is just a collection of the libraries as we downloaded them from their respective official sites. We don't take any responsibility for the way the actual libraries work or affect your PC.

 

### GridView

---

GridView is a simple smoke rendering implemented in OpenGL. it is located in the **\samples\GridView **directory.

 

![image](media://59e095cb-4399-4a3a-82e9-e25c9f686c76)

 

**Prerequisites**:

In order to build this sample, all external libraries must be located in a **GridView/external_libs**.

** **  
** **

**Build steps**:

- Place all external libraries in **GridView/external_libs**.
- Use CMake to generate project files that best suite you needs. Please take in account the **C++ Platform Toolset **that is used by your version of Phoenix API. See the [Using Phoenix API](https://docs-chaos.atlassian.net/wiki/spaces/PHX3MAYA4EDIT/pages/117285243) section.
- Set PHOENIX_SDK_DIR to Phoenix API, for example: *C:\Program Files\Chaos Group\Phoenix FD\Maya NNNN for x64\SDK*.
- Generate the project files and build.

 

### CSVParticles

---

CSVParticles exports particle groups stored in Phoenix **.aur* files to **.csv* recognized by Thinkbox Krakatoa**™** ([CSV File Format](https://docs.thinkboxsoftware.com/products/krakatoa/2.12/Documentation/manual/formats/csv_file_format.html)).

 

**Prerequisites**:

In order to build this sample, all external libraries must be located in a **CSVParticles/external_libs**.

** **  
** **

**Build steps**:

- Place all external libraries in the folder *CSVParticles/external_libs*.
- Use CMake to generate project files that best suite you needs. Please take in account the **C++ Platform Toolset **that is used by your version of Phoenix API. See the [Using Phoenix API](https://docs-chaos.atlassian.net/wiki/spaces/PHX3MAYA4EDIT/pages/117285243) section.
- Set PHOENIX_SDK_DIR to Phoenix API, for example *C:\Program Files\Chaos Group\Phoenix FD\Maya NNNN for x64\SDK*.
- Generate the project files and build.