How to format cells in google sheets by api?

How to set background red for cell (A1) ? I try this:

  const formatOptions = {
    spreadsheetId: '...',
    resource: {
      request: {
        backgroundColor: {
          "red": 255,"green": 0,"blue": 0,
        }
      },
      responseRanges: 'Sheet1!A1',
    }
  };
  let resFormatting = await gsapi.spreadsheets.batchUpdate(formatOptions);

or

I try this:

  const formatOptions = {
    spreadsheetId: '...',
    sheets: {
      conditionalFormats: [
        {
          booleanRule: {
            condition: {
              type: 'TEXT_EQ',
              values: [{userEnteredValue: 'Hello world'}]
            },
            format: {
              backgroundColor: {
                "red": 255,"green": 0,"blue": 0,
              }
            }
          }
        }
      ]
    }
  };

It doesn't work. I get error about json syntax.

How to send params correctly ?