---
title: "Social Media Image"
method: GET
path: "/api/img-gen/{tref}"
tags: ["Misc"]
---

# Social Media Image

`GET /api/img-gen/{tref}`

Given a Sefaria text `Ref` or page path and some other optional parameters, this endpoint returns a .png image ready to share on social media. At Sefaria.org we use it primarily to auto-generate social media images for any page. If no path is provided, the endpoint returns a fallback image for the request host.

## Query parameters

- `lang` 'he' | 'en'
- `platform` 'facebook' | 'twitter'
- `ven` string
- `vhe` string

## Response `200`

Successful Response

---

[API](https://skmtc.net/sefaria/apis/sefaria-api.md) · [All operations](https://skmtc.net/sefaria/apis/sefaria-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sefaria/sefaria-api/revisions/d29296717011/schema)
