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

# useFantasma

> Hosted Fantasma setup and managed endpoint guidance.

# Intro

[useFantasma](https://usefantasma.com) is the hosted Fantasma product. It gives
you the Fantasma API and dashboard without running the stack yourself. You can
see it in the [live demo](https://usefantasma.com/demo).

## How To Use It

When setting up your SDK, use the hosted API base URL and the project-scoped
ingest key:

<CodeGroup>
  ```swift Swift theme={null}
  import Foundation
  import FantasmaSDK

  let serverURL = URL(string: "https://api.usefantasma.com")!

  try await Fantasma.configure(
      serverURL: serverURL,
      writeKey: "<your-usefantasma-ingest-key>"
  )
  ```

  ```kotlin Android theme={null}
  import com.fantasma.sdk.FantasmaClient
  import com.fantasma.sdk.FantasmaConfig

  val client = FantasmaClient(
      context = applicationContext,
      config = FantasmaConfig(
          serverUrl = "https://api.usefantasma.com",
          writeKey = "<your-usefantasma-ingest-key>",
      ),
  )
  ```

  ```dart Flutter theme={null}
  import 'package:fantasma_flutter/fantasma_flutter.dart';

  final client = FantasmaClient(
    FantasmaConfig(
      serverUrl: 'https://api.usefantasma.com',
      writeKey: '<your-usefantasma-ingest-key>',
      storageNamespace: 'primary',
    ),
  );
  ```
</CodeGroup>
