OpenGraph Image Generation API

OpenGraph Image Generation API

Generate beautiful OpenGraph images

Overview

The OpenGraph Image Generation API - to enable users to quickly and easily create high-quality, visually engaging OpenGraph images for their online content without having to design them from scratch. The emphasis is on simplicity, ease of use, and the ability to leverage pre-designed templates to save time and effort.

Features

  • Generate high-quality OpenGraph images: Image generation API generates high-quality image files that are suitable for use as OpenGraph images, which are typically displayed on social media platforms when sharing content.
  • Choose from beautiful image templates: The API provides pre-designed image templates that users can leverage to create their OpenGraph images, ensuring a consistent and visually appealing look and feel.
  • Simple and easy to use API: The OpenGraph API has a straightforward design, with a single GET endpoint and a few required parameters, making it easy to integrate into applications and workflows.

Getting Started

To access the OpenGraph Image Generation API , you need to obtain an API key from AnyAPI.io. The API key is used for authentication and should be included in the request URL as a query parameter.

Let’s Try Sign In.

OG Image Generation for blog posts endpoint

Send a GET request to the following URL to OG Image Generation for blog posts

curl --request GET \
  --url 'https://anyapi.io/api/v1/opengraph/image/blog?title=Hello%2C%20World!&author=John%20While&apiKey=YOUR_API_KEY'
"The generated OG image"

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

titlestringRequired
Blog post title
authorstringRequired
Blog post author
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

contentimage/png
The generated OG image

Response and error codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.

Status CodeTypeDetails
200OKThe request was successful.
400Bad RequestThe request was invalid or cannot be otherwise served.
401UnauthorizedAuthentication credentials were missing or incorrect.
422Quota reachedThe request cannot be served due to the application's rate limit having been exhausted for the resource.
404Not FoundThe requested resource could not be found.
429Too Many RequestsThe request cannot be served due to the application's rate limit having been exhausted for the resource.
500Internal Server ErrorSomething went wrong on the server.
503Service UnavailableThe service is temporarily unavailable.