Dashboard

Dashboard/Tools/Code to Image Studio

Code to Image Studio

Transform raw code snippets into high-end macOS & Windows window screenshots with syntax highlighting and gradients.

Language
File Tab Title
Syntax Theme
Window Header Style
Font Size14px
Line Numbers
Padding48px
Window Shadow
Live Code Canvas
17 lines•typescript
resolveMedia.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { ofetch } from 'ofetch'

export interface MediaPayload {
  url: string
  quality?: '1080p' | '720p' | 'audio'
}

export async function resolveMedia(payload: MediaPayload) {
  const endpoint = '/api/download/resolve'
  const response = await ofetch(endpoint, {
    method: 'POST',
    body: payload,
    timeout: 8000
  })

  return response.data
}
© 2026 YannClipper Studio•
•GitHub