---
agent:
  instructions: "Search the site by keyword or question. The search API returns Markdown."
  endpoint: "https://platform.invideo.io/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# fal

> Call the Platform in fal's queue API format with your Platform API key.

Base URL:

```text
https://platform-api.invideo.io/fal
```

Use a Platform model ID, an alias, or the part of a fal app ID after the owner.

```js
const response = await fetch("https://platform-api.invideo.io/fal/nano-banana-2-1", {
  method: "POST",
  redirect: "error",
  headers: {
    Authorization: `Key ${process.env.INVIDEO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ prompt: "A red fox in fresh snow" }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

```bash
curl -X POST https://platform-api.invideo.io/fal/nano-banana-2-1 \
  -H "Authorization: Key $INVIDEO_API_KEY" -H "Content-Type: application/json" \
  -d '{"prompt": "A red fox in fresh snow"}'
# {"request_id": "...", "status_url": ".../status", "response_url": "..."}
```

- Send the same authorization header to the Platform `status_url` until it returns `COMPLETED`, then GET the Platform `response_url` to read the result in fal's shape.
- A target of `fal.run` (the proxy header `x-fal-target-url`) or `/fal/run/{app}` returns when the run ends.
- `num_images` must be 1. Webhooks and cancelling are not supported yet.
