toggle api base