The Swans advanced to the Capital One Cup third round after goals from Nathan Dyer, Matt Grimes - his first for the club - and sub Marvin Emnes saw off York City at the Liberty.
Dyer opened the scoring after just 82 seconds as he slotted home after Eder was denied by keeper Scott Flinders.
The Swans had a number of chances to double their advantage before the break, with Flinders making a couple of inspired saves for the visitors.
It took until the 64th minute for the Swans to double their lead as Grimesdeflected shot found the net via the near far post.
And Emnes ensured the 2013 winners were in the draw for the third round as he fired home in the final moments to finish off a brave effort from the League Two side.
The Swans made 11 changes with the starting XI including five players that started in the club's final win over Bradford City in this competition in 2013, with Angel Rangel, Leon Britton, Ki Sung-Yueng, Nathan Dyer and Wayne Routledge all involved.
Garry Monk handed debuts to summer signings Kristoffer Nordfeldt and Franck Tabanou, while Eder made his first start for the club.
Rangel, Kyle Bartley, Jordi Amat and Matt Grimes all made their first appearances of the season while Ki returned from injury after missing the league fixtures against Newcastle United and Sunderland. Britton, meanwhile, captained the hosts.
York, who were 16th in League Two after picking up four points in as many games, included former Swans loanee Keith Lowe - a Football League Trophy and Welsh Cup winner with the club - in their starting XI.
SWANS: Kristoffer Nordfeldt, Angel Rangel, Kyle Bartley, Jordi Amat, Franck Tabanou, Leon Britton (capt), Ki Sung-Yueng (Jonjo Shelvey, 81), Matt Grimes (Marvin Emnes, 76), Nathan Dyer (Andre Ayew, 87), Wayne Routledge, Eder.
SUBS: Gerhard Tremmel, Kyle Naughton, Federico Fernandez, Bafe Gomis.
YORK CITY: Scott Flinders, Marvin McCoy, Femi Ilesanmi, James Berrett (Ben Godfrey, 71), Eddie Nolan, Luke Summerfield, Vadaine Oliver (Callum Rzonca, 71), Russell Penn (capt, Josh Carson, 78), Keith Lowe, Dave Winfield, Reece Thompson.
SUBS: Michael Ingham, Taron Hare, David Tutonda, Emile Sinclair.
The Swans got off to a flying start, and they were ahead after just 82 seconds.
When Wayne Routledge's pass sent Eder in on goal, the striker's shot deflected off keeper Scott Flinders to Nathan Dyer, and the winger slotted home from just inside the box.
The Swans were relentless, and after five minutes they were within a yard of doubling their lead.
Dyer found himself in space down the right flank and his cross found Eder, but a superbly-timed block by Marvin McCoy deflected the shot wide for a corner.
The home side continued to probe, and Routledge was denied by a fine save by Flinders as he pushed his curling effort wide at full stretch.
Eder and Franck Tabanou then saw efforts blocked by the visitors' defence before Ki's powerful effort across goal was pushed wide for a corner by Flinders.
The chances kept coming, and from the resulting corner Kyle Bartley was first to the delivery but he volleyed high and wide.
York responded with a neat attack down their left, which ended with James Berrett firing goalwards but Jordi Amat bravely diverted it for a corner.
From the delivery, Vadaine Oliver rose highest and his goalbound header was tipped wide by Kristoffer Nordfeldt's acrobatic save.
And, moments later, the away supporters were on their feet after Berrett's shot took a deflection before cannoning back out off the crossbar.
Immediately the Swans were back on the attack and when Eder ran through in on goal, he unselfishly squared to Matt Grimes, but he squandered a great chance by sidefooting wide from 12 yards after 25 minutes.
Then Eder went for goal himself after Grimes pinched possession some 25 yards out, but the striker's effort was deflected over by Dave Winfield for a corner.
And he went close from the corner as his diving header bounced just wide of the near post with Flinders stranded on his line.
The Portuguese international looked certain to score in the 40th minute as Routledge linked with Grimes, and his cross found Eder eight yards out but Flinders did remarkably well to divert his effort wide.
There was just enough time for Eder to turn neatly in the box only to see Flinders parry his low attempt, and that proved the final action of the half with the Swans taking a narrow advantage into the break.
HALF-TIME: Swans 1 York City 0
The home side started the second half brightly, and the Swans should have been celebrating another goal just three minutes in.
After Grimes again won possession off York, he raced on before cutting inside on his left foot before blasting high over the crossbar from the edge of the box.
York, though, were looking to hit the hosts on the break and Oliver went within inches of levelling as his curling effort just dropped over the top corner.
The Swans were quickly back on the front foot, and Ki had a sight of goal only to see his shot deflected wide by Winfield, who bravely dived in to divert the Korean's effort.
Another wasted opportunity saw Bartley's diving header from a Routledge cross fly wide of Flinders' near post on the hour mark, while Eder failed to find the target soon after.
But the second goal did come in the 64th minute in rather fortuitous circumstances as Grimes' low effort took a deflection before bouncing in off the far post.
That proved his final action as he was replaced by Marvin Emnes for the remaining 15 minutes, while Jonjo Shelvey came on in place of Ki Sung-Yueng soon after.
Emnes tested Flinders from 20 yards out, with the sub being teed up by Eder, only to see the keeper collect low down.
Monk introduced Andre Ayew in place of Dyer for the remaining few minutes, but it was Emnes who would have the final say.
The Dutch winger's persistence paid off as he latched onto a loose ball and fired home from an angle 15 yards out in the 89th minute.