<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def api_start(working_dir, host, port, thread=True):
 """ Start the global API server Returns the API server thread """

    api_srv = BlockstackdAPIServer( working_dir, host, port )
    log.info("Starting API server on port {}".format(port))
    if thread:
        api_srv.start()

    return api_srv