Style TransferFree tier available

Transform photos into detailed pencil sketch portraits with AI

Convert any photo into a high-quality hand-drawn style pencil sketch using advanced AI. Upload a portrait, full body shot, or scene and get back a detailed line drawing — perfect for artistic portraits, coloring book pages, or unique visual content.

See It in Action

Real examples generated by the API. See the quality for yourself.

Pencil Sketch PortraitAPI Output
Pencil Sketch Portrait

Left: original photo — Right: AI-generated pencil sketch portrait

Features

AI Pencil Sketch

Advanced deep learning model that converts photos into detailed, realistic pencil sketch line drawings.

Fast Processing

Get pencil sketch results in seconds with our optimized cloud inference pipeline.

Flexible Input

Upload a file via multipart or pass a public image URL — both work seamlessly.

Works on Any Photo

Portraits, full body shots, scenes with backgrounds — the model handles them all with fine detail.

Preserves Details

Captures facial features, hair, clothing patterns, and architectural elements in the line drawing.

Cloud-Based

No GPU needed on your end. Fully managed cloud infrastructure handles the processing.

API Reference

1 endpoint, simple integration. Here's everything you need.

Supported Content Types

multipart/form-dataapplication/x-www-form-urlencoded
POSThttps://phototoportrait.p.rapidapi.com/photo-to-portrait

Convert a photo into a detailed pencil sketch line drawing using AI. Returns a JSON response with a CDN URL to the result image, along with image dimensions and file size.

imagefilerequired

Image file (JPEG, PNG, WebP) — use with multipart/form-data

urlstringrequired

Public URL of the image to process — use with application/x-www-form-urlencoded

Send either image (file upload) or url (form-encoded), not both.

Response Schema
{
  "image_url": "https://images.ai-engine.net/photo-to-portrait-api/051583c1-...jpg",
  "width": 1037,
  "height": 1555,
  "size_bytes": 176447
}

Response

200

Returns JSON with a CDN URL to the pencil sketch image, along with image width, height, and size in bytes.

Quick Start

Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.

# File upload
curl -X POST "https://phototoportrait.p.rapidapi.com/photo-to-portrait" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: phototoportrait.p.rapidapi.com" \
  -F "image=@photo.jpg"

# URL input
curl -X POST "https://phototoportrait.p.rapidapi.com/photo-to-portrait" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: phototoportrait.p.rapidapi.com" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=https://example.com/photo.jpg"

Pricing

Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.

Free

Basic

$0Free

100 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Pro

$12.99/mo

10,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support
Recommended

Ultra

$49.99/mo

50,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Mega

$159.99/mo

200,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Start Using Photo to Portrait Today

Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.