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

# JSONPlaceholder

> Free fake REST API for testing and prototyping, providing six resources (posts, comments, users, albums, photos, todos) with full CRUD operations.

Free fake REST API for testing and prototyping, providing six resources (posts, comments, users, albums, photos, todos) with full CRUD operations. Best for frontend developers prototyping against a realistic REST backend without setup. Writes are faked but return proper response structures — ideal for testing HTTP clients and demo workflows.

2 example endpoints available through Lava's AI Gateway. See the [JSONPlaceholder API docs](https://jsonplaceholder.typicode.com/guide/) for full documentation.

<Info>This provider is **managed** — no additional setup required.</Info>

<Info>This is a **catch-all provider** — any valid URL under `https://jsonplaceholder.typicode.com` is supported. Fake REST API for testing. Construct URL as [https://jsonplaceholder.typicode.com/\&#123;resource\&#125](https://jsonplaceholder.typicode.com/\&#123;resource\&#125);. Resources: /posts, /comments, /users, /albums, /photos, /todos. Supports GET, POST, PUT, PATCH, DELETE. The endpoints below are curated examples.</Info>

## Endpoints

### List all posts

**GET** `https://jsonplaceholder.typicode.com/posts` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://jsonplaceholder.typicode.com/posts', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fjsonplaceholder.typicode.com%2Fposts" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a post (faked)

**POST** `https://jsonplaceholder.typicode.com/posts` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://jsonplaceholder.typicode.com/posts', { body: {"title":"foo","body":"bar","userId":1} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fjsonplaceholder.typicode.com%2Fposts" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"title":"foo","body":"bar","userId":1}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
