Skip to content

whosydd/carbon-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carbon-api

Usage

  • url: https://carbon-api.vercel.app/api
  • method: POST
  • request.body: code, theme
    • optional theme: 3024 Night, A11y Dark, Blackboard, Base 16 (Dark), Cobalt, Dracula ProPurchase, Duotone, Hopscotch, Lucario, Material, Monokai, Night Owl, Nord, Oceanic Next, One Light, One Dark, Panda, Paraiso, Seti, Shades of Purple, Solarized (Dark), Solarized (Light), SynthWave '84, Twilight, Verminal, VSCode, Yeti, Zenburn
  • response.data: ArrayBuffer
const res = await axios.post(
  `https://carbon-api.vercel.app/api`,
  { code, theme },
  { responseType: 'arraybuffer' }
)

Vercel

Deploy with Vercel

Known issues

The maximum execution timeout is 10 seconds when deployed on a Personal Account (Hobby plan). read more

If you got error code FUNCTION_INVOCATION_TIMEOUT, please retry.