You confuse the concept with implementation. A domain-specific language is any representation of an idea that is considered to be "close" to the subject area, and is not a common language for describing problem solving in general.
Yes, DSL can be implemented as an API that provides functions related to specific concepts in a problem area, but DSL is equally valid when presented as a text file.
Pragmatic programmer: Journeyman to Master provides a good description of DSL and the circumstances in which they are useful, with examples. Highly recommended.