---
title: "Social preview image"
method: GET
path: "/v1/og-image"
tags: ["Generated images"]
---

# Social preview image

`GET /v1/og-image`

## Request

- Base URL: `https://api.dharun.dev`
- URL: `https://api.dharun.dev/v1/og-image`
- Auth: none declared

A 1200 by 630 card for og:image and twitter:image: a title (set as large as fits in three lines, cut with an ellipsis beyond that), an optional subtitle of up to two lines, and a site name and tag along the bottom. The same URL always gives the same picture, so it can be used directly in a meta tag.

## Query parameters

- `title` string, required
- `subtitle` string
- `site` string
- `tag` string
- `theme` 'dark' | 'light'
- `bg` string
- `fg` string
- `accent` string
- `format` 'png' | 'svg'

## Response `200`

Success

## Other responses

- `400`: Error
- `404`: Error
- `429`: Error

---

[API](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data.md) · [All operations](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/llms.txt) · [OpenAPI document](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/revisions/ecd8b0ec7863?raw)
