$api

The fully configured $fetch instance for the Statamic API.
See createFetchInstance for more information on what this instance is configured with.

Usage

The $api instance is a fully configured $fetch instance for the Statamic API.

It is available in the Nuxt app via the useNuxtApp composable.

app/pages/index.vue
<script setup lang="ts">
const { $api } = useNuxtApp()
</script>