Back to Puter

puter.ai.listModelProviders()

src/docs/src/AI/listModelProviders.md

26.05.2568 B
Original Source

Returns the AI providers that are available through Puter.js.

Syntax

js
puter.ai.listModelProviders()

Parameters

None

Return value

A Promise that will resolve to an array of string containing each AI providers.

Examples

html;ai-list-model-providers
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        (async () => {
            // Fetch all providers
            const providers = await puter.ai.listModelProviders();
            puter.print(providers)
        })();
    </script>
</body>
</html>