Use the tr.im API to create tr.im URLs outside of the standard website forms. With tr.im on the main site, you can tr.im it and tweet it to Twitter in the same action. Also on the main site, after you log in, you can view all your tr.im URLs since the time that you signed up. With the API, you can shorten URLS, submit a custom URL that you prefer to an auto-generated URL, insert tag words to the URL, submit usernames and passwords to attach to the generated URL, and get a list of the domain names currently configured as domain name shortening services that tr.im will not allow to be in the destination URL.
Popular URL shortening site tr.im has quickly shuttered its service due to lack of revenue potential (our tr.im API profile). One of tr.im's creators, Eric Woodward, also referenced Twitter's choice of bit.ly (our bit.ly API profile) as a default URL shortener as factoring into their decision.