code.to.design logo
code.to.design API

Endpoint:https://api.to.design

/html

POST
https://api.to.design
/html

Converts HTML to Figma.

/htmlHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

/html Request Body

  • htmlstring · required

    HTML string to convert to Figma.

  • clipboolean

    true to use Clipboard mode, false to use Plugin mode

  • widthnumber

    Width of the viewport. If width is used then height is required. Default value: 1280

  • heightnumber

    Height of the viewport. If height is used then width is required. Default value: 720

  • themestring · enum

    Affects CSS prefers-color-scheme settings for the import. Default value: light

    Enum values:
    light
    dark

/html Responses

Rate Limiting Response

  • typestring · required

    A URI reference that identifies the problem.

  • titlestring · required

    A short, human-readable summary of the problem.

  • statusnumber · required

    The HTTP status code.

  • instancestring

/balance

GET
https://api.to.design
/balance

Get the number of calls that are still available for your account.

/balanceHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

/balance Responses

Rate Limiting Response

  • typestring · required

    A URI reference that identifies the problem.

  • titlestring · required

    A short, human-readable summary of the problem.

  • statusnumber · required

    The HTTP status code.

  • instancestring