Business Card template

The business-card template renders a business image as a PNG. POST a JSON payload to the endpoint below and you receive a CDN URL in the response.

Marketing page

See the Business Card template in our gallery

Sample renders, use cases and pricing context.

View use cases →

Endpoint

POST https://app.html2img.com/api/v1/templates/business-card
X-API-Key: <your-api-key>
Content-Type: application/json

Authentication uses the X-API-Key header. See the authentication docs for details on issuing and rotating keys.

Inputs

The full set of inputs the template accepts:

Name Type Required Description Example
name string Yes Display name for the rendered subject. Margaret Lin
title string No Main headline shown in the image. Senior Production Engineer
company string No Text value for the company. Halberd Software
email string No Text value for the email. [email protected]
phone string No Text value for the phone. +1 (415) 555-0142
website string No Text value for the website. halberdsoft.com
logo_url url No URL of the logo to include in the rendered image. -
accent_color string No Hex colour code for the accent. #0F766E
layout_variant enum (classic | minimal | bold) No One of the supported layout variant values listed below. classic

Enum values

layout_variant accepts one of: classic , minimal , bold .

Defaults

Defaults applied automatically when not overridden in the request:

Option Default value
width 1050
height 600

Code examples

curl -X POST https://app.html2img.com/api/v1/templates/business-card \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Margaret Lin","title":"Senior Production Engineer","company":"Halberd Software","email":"[email protected]","phone":"+1 (415) 555-0142","website":"halberdsoft.com","accent_color":"#0F766E","layout_variant":"classic"}'

Looking for a fuller integration sketch in your language? The usage guides cover PHP, Laravel, Rails, Python, JavaScript, React and Vue.

Response

A successful render returns:

{
 "success": true,
 "id": "abc123",
 "url": "https://i.html2img.com/abc123.png",
 "credits_remaining": 1234,
 "template": "business-card"
}

The url field is a CDN URL for the rendered PNG. credits_remaining tracks your monthly quota. Shared response fields are documented in the API parameters reference.

Errors

The template endpoint returns the following error responses:

422 Validation failed

Returned when one or more inputs fail validation. The errors object lists field-specific messages.

{
 "success": false,
 "error": "validation_failed",
 "errors": {
 "title": ["The title field is required."]
 }
}

404 Template not found

Returned with {"code": "template_not_found"} if the slug is not registered. Check the template list for current slugs.

401 Unauthorised

Missing or invalid API key. See the authentication docs.

429 Too many requests

You have hit the rate limit or used your monthly credits. The pricing page covers higher-volume plans.

Related templates

Other templates in the business and commerce category:

  • Certificate of completion - Print-ready certificates for course completion, training, and recognition
  • Coupon and voucher - Promotional voucher images sized for email body and SMS preview
  • Event ticket - Print- and email-ready tickets with QR/barcode slot and perforated stub
  • Invoice image - Render full invoices as PNG images for emails, dashboards, and exports
  • Real estate listing - Property listing cards for MLS exports, social shares, and email blasts
  • Receipt image - Compact order receipts for confirmation emails and thank-you screens

Browse by category

A starting point from each of the other template categories. The templates index lists every reference page.

Social media: Facebook post , Instagram square post

Content and marketing: Blog hero image , Code screenshot

See the Business Card marketing page for sample renders and use cases.