do something on spec
1. Of some kind of work, done with the hope of selling it to make a profit, but without a prior agreement or contract. "Spec" is short for "speculation." No, we didn't commission the developer to build our house—it was built on spec with the rest of them. Dave wrote that script on spec and ended up selling it to the studio.
2. According to exact specifications. If you need any computers built on spec, they're the team to do it.
3. Describing an attempt to attend an event without obtaining a ticket (or other means of entrance) beforehand. Primarily heard in UK. You can't go to that play on spec—it's too popular, and you'll never get in.
do something on ˈspec(British English, informal) go somewhere without a ticket, an appointment, etc. in the hope that you will be able to get something you want: That restaurant’s very popular. You’ll never get a table if you just turn up on spec.
Spec is short for speculation (= doing something without knowing all the facts).