If you watch television nowadays, you probably know that so-called reality TV now dominates primetime network broadcast schedules and represents a huge and growing portion of what’s on cable. What you probably don’t know is that many of these shows are written or produced here in New York City — and often in appalling conditions.

Many of the top production companies behind these shows have significant production operations based in New York. They are a mix of local, independently owned operations and outposts of foreign media conglomerates. Reality TV reaps enormous profits for its investors. A recent wave of multimillion-dollar acquisitions and mergers demonstrates how much money there is here. For example, British media giant ITV recently purchased one New York-based production company, Leftfield Entertainment, for an eye-popping $360 million.

But the typical reality TV show’s onscreen action is not spontaneous. Instead, it’s the product of a team of writer-producers who carefully structure every moment that appears onscreen. They are charged with creating narrative arcs and storylines, writing interview questions and narrator voiceovers — and even scripting dialogue.

There would be no reality TV without these writer-producers. Approximately 2,000 such employees are engaged here in NYC every year. Yet they are routinely being shortchanged — both in terms of pay and working conditions.

Writer-producers are nearly always hired as freelancers, creating inherent economic insecurity (especially between projects). While engaged on a gig, they report regularly being required to work 12, 14, 16 or more hours per day with no overtime. Eight-hour days are rare, as are weekends and other paid time off.

The vast majority of these workers are 25 to 44 years old. The intense schedules imposed by employers — which often require 24/7 availability — and the lack of benefits make it extremely difficult if not impossible to start or maintain a family. This in turn often shuts parents and older workers out of these jobs.

It’s all a far cry from the world of primetime, high-budget dramas and sitcoms — where employees typically earn solid family-supporting incomes and can count on union protections, health care and retirement benefits.

A decade ago, reality TV might have seemed like a passing fad. That’s clearly no longer the case.

It’s time for us to bring this burgeoning industry into the 21st century. To improve labor practices, I call on the networks and the production companies to agree, at a minimum, to a Code of Conduct that would provide for the following:

- Reasonable production budgets and schedules

- Adequate staffing levels

- Guarantees that employees will not be required to work excessive hours, and that all wage and hour laws will be honored

- Paid time off

- Basic benefits, including employer-sponsored health care

- A commitment to honor the right of employees to form a union

Reality TV production is an important, valued and growing industry in New York City, and we welcome them. But with that success comes responsibility. Reality TV jobs must be good jobs, ensuring that workers’ dignity and basic rights are respected.

I. Daneek Miller is a New York City councilman, representing District 27, and is chair of the City Council’s Committee on Civil Service and Labor.