Overview
Composables
Each endpoint yields two composables, both auto-imported:
- Async data composable – Returns multiple values similar to
useFetch. Generated name:useMyApiData. - Plain fetch composable – Returns response data, similar to
$fetch. Generated name:$myApi.
Server code gets its own $myApi, which reaches your API without the proxy. See Server Imports.
Generated Composables
Composable names come from your API endpoint ID. An endpoint jsonPlaceholder generates:
$jsonPlaceholderuseJsonPlaceholderData
Types
- OpenAPI Type Helpers – Extract request, response and parameter types from an endpoint's OpenAPI schema.