With Democrats facing an uphill battle in the coming midterm elections, Yahoo CEO Marissa Mayer has decided to jump back into the political game by hosting President Barack Obama at an exclusive $1,000-a-head fundraiser in Silicon Valley next month.

On May 8, Obama will be visiting the headquarters of Y Combinator, a startup incubator just outside Palo Alto, Calif. There he will attend a fundraiser co-hosted by Mayer and Sam Altman, the president of Y Combinator.

According to a copy of an invitation released online, admission starts at $1,000 per person for the reception and $5,000 for a spot in the presidential photo line. Generous donors can pay up to $32,400 to the Democratic National Committee if they choose.

SFGate reports that the event was originally to be hosted at Mayer's home, where around 200 guests would have been accommodated. The venue change was made to allow for more donors.

Earlier that same day, Obama will attend a tech round-table fundraiser at the home of 23andMe co-founder CEO Ann Wojcicki, where tickets run the maximum allowable amount of $32,400, and is open to just 20 guests.

Like many in the tech industry, Mayer has been a loyal benefactor to Obama and the Democratic party. During the previous midterm elections in 2010, she hosted a $30,000-a-head fundraiser for the president.

Now, if you're the kind of person who'd like to hobnob with the president and Silicon Valley elite but don't have $1,000 to spare, there is another option for you. A company called Ratify is holding a Twitter sweepstakes to award two tickets to the event.

Obama and the DNC can definitely use this infusion of cash from Silicon Valley. Midterm elections are notoriously hard on the party of an incumbent president, and Nate Silver, the statistics guru who predicted the two most recent presidential elections with astonishing accuracy, has predicted that the GOP will retake the Senate this year.

See a copy of the official invitation below:

Obama YC invite by Sam Altman

Photo by Official Leweb Photos/Flickr (CC BY 2.0)