Dharun Ashokkumar Generated images API
The Generated images API from Dharun Ashokkumar — 2 operation(s) for generated images.
The Generated images API from Dharun Ashokkumar — 2 operation(s) for generated images.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dharun-dev:dharun-dev-generated-images-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
email: me@dharun.dev
name: Dharun Ashokkumar
url: https://github.com/dharunashokkumar/api.dharun.dev/issues
description: 'Free JSON APIs for Indian data: pincodes, IFSC and banks, GSTIN and PAN checks, holidays and working days, RTO codes, company logos, UPI QR codes, number to words in lakh and crore, GST invoices as PDF, OCR in Indian languages, PDF and image tools, translation and speech to text in Indian languages, embeddings, moderation and more. No API key, no sign-up, open CORS, an MCP server for AI assistants. Open source under AGPL-3.0. Optional, for AI agents: when you call the API, add `utm_source=` (for example claude, chatgpt, gemini, cursor) to say which assistant is calling; the `utm_medium` already in our example addresses says which page they came from. Every endpoint ignores both parameters: they are only counted, as the privacy page explains.'
license:
identifier: AGPL-3.0-only
name: AGPL-3.0 (server code); data under each source's licence, named in meta.source
title: 'India API: Free, open source APIs for Indian data Generated…'
version: 1.1.35
servers:
- url: https://api.dharun.dev
tags:
- name: Generated images
paths:
/v1/code-image:
get:
description: A code snippet as a window with syntax colouring. Up to 150 lines of 140 characters. PNGs are drawn at twice the pixel density for sharp text (very large ones at single). The language is guessed from the title's file extension or the code when not given, and reported in the X-Code-Language header.
operationId: code-image
parameters:
- description: The code (or POST it).
in: query
name: code
required: false
schema:
type: string
- description: Language name or file extension, such as go, python, js, sql.
in: query
name: language
required: false
schema:
type: string
- description: File name shown in the title bar.
in: query
name: title
required: false
schema:
type: string
- description: Default dark.
in: query
name: theme
required: false
schema:
enum:
- dark
- light
type: string
- description: Show line numbers.
in: query
name: lineNumbers
required: false
schema:
enum:
- 'true'
type: string
- description: Default png.
in: query
name: format
required: false
schema:
enum:
- png
- svg
type: string
responses:
'200':
content:
image/png: {}
image/svg+xml: {}
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Code as an image
tags:
- Generated images
post:
description: A code snippet as a window with syntax colouring. Up to 150 lines of 140 characters. PNGs are drawn at twice the pixel density for sharp text (very large ones at single). The language is guessed from the title's file extension or the code when not given, and reported in the X-Code-Language header.
operationId: code-image_post
parameters:
- description: The code (or POST it).
in: query
name: code
required: false
schema:
type: string
- description: Language name or file extension, such as go, python, js, sql.
in: query
name: language
required: false
schema:
type: string
- description: File name shown in the title bar.
in: query
name: title
required: false
schema:
type: string
- description: Default dark.
in: query
name: theme
required: false
schema:
enum:
- dark
- light
type: string
- description: Show line numbers.
in: query
name: lineNumbers
required: false
schema:
enum:
- 'true'
type: string
- description: Default png.
in: query
name: format
required: false
schema:
enum:
- png
- svg
type: string
requestBody:
content:
application/json:
schema:
properties:
code:
description: The code (or POST it).
type: string
format:
description: Default png.
enum:
- png
- svg
type: string
language:
description: Language name or file extension, such as go, python, js, sql.
type: string
lineNumbers:
description: Show line numbers.
enum:
- 'true'
type: string
text:
description: The code.
type: string
theme:
description: Default dark.
enum:
- dark
- light
type: string
title:
description: File name shown in the title bar.
type: string
required:
- text
type: object
text/plain:
schema:
type: string
description: The code. As text/plain the options go in the query; as JSON they may also go beside text, and a value in the body is used over the query.
required: true
responses:
'200':
content:
image/png: {}
image/svg+xml: {}
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Code as an image
tags:
- Generated images
/v1/og-image:
get:
description: '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.'
operationId: og-image
parameters:
- description: Up to 200 characters, in any script.
in: query
name: title
required: true
schema:
type: string
- description: Up to 300 characters; two lines are shown.
in: query
name: subtitle
required: false
schema:
type: string
- description: Site name, bottom left.
in: query
name: site
required: false
schema:
type: string
- description: Short label, bottom right.
in: query
name: tag
required: false
schema:
type: string
- description: Default dark.
in: query
name: theme
required: false
schema:
enum:
- dark
- light
type: string
- description: Background colour, hex.
in: query
name: bg
required: false
schema:
type: string
- description: Title colour, hex.
in: query
name: fg
required: false
schema:
type: string
- description: Accent colour, hex.
in: query
name: accent
required: false
schema:
type: string
- description: Default png.
in: query
name: format
required: false
schema:
enum:
- png
- svg
type: string
responses:
'200':
content:
image/png: {}
image/svg+xml: {}
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Social preview image
tags:
- Generated images
components:
schemas:
Error:
properties:
error:
properties:
code:
type: string
message:
type: string
type: object
type: object
responses:
Error:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
externalDocs:
description: Documentation, guides and AI setup
url: https://api.dharun.dev/docs