---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk-predictions/functions/createPredictions.md
---
[Reference](../../../index.md) / [@getenginex/sdk-predictions](../index.md) / createPredictions

# createPredictions()

> **createPredictions**(`client`): [`PredictionsClient`](../interfaces/PredictionsClient.md)

Creates the predictions namespaces on top of a `@getenginex/sdk` client. It creates no session, tenant
or transport of its own and makes no request: call it once per client (in the browser, one per
app; on the server, one per request, together with the client).

After `enginex.dispose()`, `createPredictions` still accepts the client, but every
predictions method rejects with `CONFIGURATION_ERROR`, like the core methods.

## Parameters

### client

[`EnginexClient`](../../sdk/interfaces/EnginexClient.md)

The client returned by `createEnginexClient` (the object itself, not a copy).

## Returns

[`PredictionsClient`](../interfaces/PredictionsClient.md)

## Example

```ts
import { createEnginexClient } from '@getenginex/sdk'
import { createPredictions } from '@getenginex/sdk-predictions'

export const enginex = createEnginexClient({ locale: 'pt-BR' })
export const predictions = createPredictions(enginex)
```

## Throws

`CONFIGURATION_ERROR` if `client` is not a client created by
`createEnginexClient` (e.g. an arbitrary object or a `{ ...enginex }` copy), or if it was created
by an incompatible copy of `@getenginex/sdk` (install a single core version). Identify
with `isEnginexError(error, 'CONFIGURATION_ERROR')`.
