> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sanas.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Lifecycle

> The six-step sequence every SDK integration follows

Every integration follows the same six-step sequence, describing the interactions between your application, the SDK, and the Sanas server.

```
CreateRemoteSDK()          // 1. Allocate the SDK (once per process)
   │
   ▼
Initialize(InitParams)     // 2. Authenticate and connect (once)
   │
   ▼
CreateAudioProcessor(...)  // 3. Open a stream → starts in kInitializing
   │                       //    transitions to kReady asynchronously
   ▼
ProcessSamples(in, out)    // 4. Stream audio while kReady (repeat)
   │
   ▼
DestroyAudioProcessor(p)   // 5. Close the stream
   │
   ▼
Shutdown()                 // 6. Release the SDK
```

## Rules

* **Initialise once.** Calling it again returns `kAlreadyInitialized`.
* Always pair `CreateAudioProcessor` with `DestroyAudioProcessor`. `Shutdown` destroys any processors you forgot to release, but explicit cleanup is preferred.
* Do not call `ProcessSamples` until the processor is in the `kReady` state (see [Processor States](/API-Reference/Cpp-SDK/Guides/Processor-States)).
* Multiple processors may run concurrently — each on its own thread if needed.

## Runtime helper queries

```cpp theme={null}
sdk->IsInitialized();            // bool
sdk->GetActiveProcessorCount();  // size_t
sanas::remote::GetSDKVersion();  // const char*
```
