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

# fal.ai

> Integrate fal.ai models with Portkey's AI Gateway via an OpenAI-compatible API.

[fal.ai](https://fal.ai/) provides fast inference for 1000+ models including LLMs, image, video, and audio generation.

> [!NOTE]
>
> Provider slug: `fal-ai`. Requires Backend `v1.16.2+` in Model Catalog.

## Quick Start

```python Python icon="python" theme={"system"}
from portkey_ai import Portkey

portkey = Portkey(api_key="PORTKEY_API_KEY")

response = portkey.chat.completions.create(
    model="@fal-ai/fal-ai/flux/schnell",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)
```

```js Javascript icon="square-js" theme={"system"}
import Portkey from "portkey-ai"

const portkey = new Portkey({ apiKey: "PORTKEY_API_KEY" })

const response = await portkey.chat.completions.create({
    model: "@fal-ai/fal-ai/flux/schnell",
    messages: [{ role: "user", content: "Hello!" }]
})

console.log(response.choices[0].message.content)
```

Add a **fal.ai** provider in [Model Catalog](https://docs.portkey.ai/docs/product/model-catalog.md) with your fal.ai API key, then reference it as `@<provider-slug>/<model-id>` in requests.

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [Backend](https://docs.portkey.ai/docs/changelog/backend.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [May](https://docs.portkey.ai/docs/changelog/2026/may.md)
- [Frontend](https://docs.portkey.ai/docs/changelog/frontend.md)
- [Azure AI Foundry](https://docs.portkey.ai/docs/integrations/llms/azure-foundry.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.