(written from a Production point of view)
The Deep Space Station K-7 was the very first free-floating space bound construction, not being a starship, ever seen in the Star Trek franchise. Despite its signature design features as a space station, having made its debut as DS K-7 in the Star Trek: The Original Series episode "The Trouble with Tribbles", stock footage of the station was only once re-utilized to represent Starbase 6 in the original airing of The Original Series, and has not been re-utilized since. Its appearance in the spin-off series' episode "Trials and Tribble-ations" from Star Trek: Deep Space Nine, was a homage to the original appearance, and not an embellishment to the Star Trek lore. The 2006 remastered Original Series nixed even its original appearance as Starbase 6, since that structure was for the occasion completely re-imagined. That left the Deep Space Station K-7 as is, being featured in "The Trouble with Tribbles" as the only space station of this particular, canonnonically established, design.
True to form, Production Designer Matt Jefferies, upon receiving the script, started to beef out design ideas for the space station. However, what he was working on at the time differed radically from what was eventually seen on-screen. Jefferies was cut short by his boss, Gene Roddenberry, who, at the time, had connections at the Douglas Aircraft Company, and was able to procure one of their space station concepts. In the end, the eventual Deep Space Station K-7 was to be based on a concept model for a real-life space station/moon base concept, proposed by Douglas Aircraft as early as 1960 for NASA. Intended to be housed in the top stage of the Saturn 1B or Saturn V rocket, it was designed to deploy like an inflatable balloon. Concept models and concept art of the Douglas inflatable space station are featured on the PROJECT RHO Reference website and on Datin's website.
Jefferies sold off his original preliminary design sketches as Lot 144, with an estimate of US$200-$300, in The Star Trek Auction of 12 December 2001, in order to raise funds for the "Motion Picture and Television Fund".
Original studio model Edit
In 1967 Roddenberry managed to acquire one of the Douglas Aircraft concept models. The Howard Anderson Company called in Richard C. Datin, Jr. to do modifications on the model for it to become K-7. As Datin remembered, "(...)I don't believe the revisions were based on any drawings, just following instructions given to me, I think by Jefferies. In other words, I had a more or less free hand in revising the model as long as it would stand up to the rigors of filming, be credible, and make any last alterations/additions to suit their needs. I haven't the remotest idea that any drawings existed...possibly a couple of hand-drawn sketches furnished by Matt may have been it."
On modifying the Douglas model Datin recalled:
"I vaguely recall it was either an off-white, dull of course, or very similar to the light gray/green Enterprise color. The model was composed of a material very unfamiliar to me. In perspective, more distinct than other substances from those days, it was a strange material. It was soft, yet resilient, but a rubbery substance, more foam-like but dense enough to hold its shape an be worked satisfactorily by machines. Each of the components, or satellite sections, were cast in this material and the alterations consisted of replacing the existing rods that held them together with Plexiglas tubing to allow electrical wiring to pass through to each other. Looking at the parts purchased for the alteration job, it looks as though I added some dome-like Plexiglas pieces to the satellites-most likely to alter their appearance sufficiently from the original Douglas design." (Star Trek: Communicator issue 133, pp. 49-50)On operating the model (when mounted on a pipe from the bottom, serving as a center support and hiding the electrical wiring) on 1 and 5 September 1967, "(...)At Howard Anderson's, during filming, I sat under it and rotated it and turned lights on and off. Then I was matted out of the shot(...)" (Cinefantastique, Vol.27, No.11/12, p. 68) The markings on the model read "United Federation of Planets" on the main section, "K-A","K-B" and "K-C" on the cones of the three circular pods and "K-7" on the central cone.
Datin modified the model from 19 to 29 August 1967 at a total cost of $688, including his fee for operating the model. (Star Trek: Communicator issue 133, p. 50) This proved to be his last involvement with Star Trek. Debuting in TOS: "The Trouble with Tribbles", this space station design was the only one ever used in original version of The Original Series. Stock footage of the K-7 space station was later seen in the original version of "The Ultimate Computer" to represent another space station, Starbase 6.
The studio model built for The Original Series has been missing for decades, either lost or destroyed.
Trials and Tribble-ations model Edit
In 1996, a new model was built by Greg Jein for use in DS9's tribute episode, "Trials and Tribble-ations". Built not from original blueprints, but from detail gleaned from watching the original show and by studying the few existing production photos and blow-ups from stills from the original episode, Jein recreated the station down to details that were never visible in that episode, like a cone-shaped structure on the back, a strobe light on the bottom, rotating pods and the block letters that read K-7. Jein explained:
"Fortunately, the clarity of detail revealed by the newly transferred original footage of "The Trouble with Tribbles" proved useful. The art department sent over a drawing that they'd made of the station, Then we made some modifications based on color prints made from the original negative, which we felt were faithful to the original design. And we sort of winged it from there.[remark: after lathe turning wood for the towers and purchasing "standard architectural material" for the tubes] Then we made molds and cast them, cut the windows out, and put neon inside."(The Magic of Tribbles: The Making of Trials and Tribble-ations, p. 42)After receiving the model, Visual Effects Supervisor Gary Hutzel recalled:"The model came over and it had these big block letters K-7 on top. It looked so goofy. It didn't look anything like the original. We powered it up, turned on the lights, and it looked exactly like the original. The big K-7 went away, because the windows hid it" (Cinefantastique, Vol.29, No.6/7, p.70). The model featured new elements, including the spacecraft in a detailed shuttlebay . That item came from one of Jein's co-workers, Jason Kaufmann, who expressed a desire to "mess around". What he came up with was a detailed miniature shuttle-bay outfitted with a NCC-K7 shuttlecraft and the Cyrano Jones' Spacematic, completely built from scratch, essentially from bits and pieces lying around Jein's model shop.(The Magic of Tribbles: The Making of Trials and Tribble-ations, p. 43)
Unaware of Datin's stint at Howard Anderson Company back in 1967, Doug Drexler discovered the rotating motion and had Larry DeUnger of Boss Films repeat the action.(The Magic of Tribbles: The Making of Trials and Tribble-ations, pp. 44-45}
The last time this filming model was seen, was in storage at Image G, where it was filmed for the episode , but like its progenitor, its current whereabouts are unknown as the model has not been sighted since.
CGI model Edit
Yet another version of K-7, this time rendered digitally, was created for the 2006 "remastered" version of "The Trouble with Tribbles" as a CGI visual effect at CBS Digital, supervised by Dave Rossi and Niel Wray. Though the K-7 doubled as Starbase 6 in the original airing of "The Ultimate Computer", for the 2008 remastering of that episode, that station was retconned with an entirely new design.
Two years earlier, Drexler, under his nome de guerre "Max Rem", also constructed a CGI model of the K-7 space station for use in James Cawley's non-profit Internet fan series Star Trek: New Voyages.  Though it was eventually not featured there, parts of his model did turn up in, and on licensed print publications like the Star Trek: Ships of the Line calendars  and their book derivative.