Skip to content

feat: Add Icon Generator API Endpoint#404

Open
Tanweer-Ahmed-Chiktay wants to merge 1 commit intoraycast:mainfrom
Tanweer-Ahmed-Chiktay:feature/icon-generator-api
Open

feat: Add Icon Generator API Endpoint#404
Tanweer-Ahmed-Chiktay wants to merge 1 commit intoraycast:mainfrom
Tanweer-Ahmed-Chiktay:feature/icon-generator-api

Conversation

@Tanweer-Ahmed-Chiktay
Copy link
Copy Markdown
Contributor

Description

This PR implements an API endpoint for programmatic icon generation, addressing issue #181.

Changes

  • Added /api/icon endpoint that accepts query parameters for customization
  • Supports all 603 Raycast icons with customizable backgrounds
  • Returns SVG format with proper caching headers
  • Includes comprehensive API documentation with examples

Features

  • Background customization: Solid colors, linear gradients, and radial gradients
  • Styling options: Border size/color, corner radius, radial glare effect
  • Icon customization: Color, size, and positioning offsets
  • Flexible output: Configurable output size

API Example

curl "http://localhost:3000/api/icon?icon=airplane&backgroundStartColor=%23FF6363&backgroundEndColor=%23FFA07A&size=256"

Testing

  • Tested with various icon names and parameters
  • Verified error handling for invalid icons
  • Confirmed proper SVG output and caching headers

Notes

  • Icon rendering uses a simplified approach suitable for API usage
  • Full documentation included in app/api/icon/README.md
  • Follows existing API route patterns in the codebase

Closes #181

- Implements API endpoint at /api/icon for programmatic icon generation
- Accepts query parameters for customizing background colors, gradients, and styles
- Supports all Raycast icons (603 icons available)
- Returns SVG format with proper caching headers
- Includes comprehensive API documentation
- Addresses issue raycast#181
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 14, 2026

@TanweerACB is attempting to deploy a commit to the Raycast Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Icon Generator as API

2 participants