When you create Asana projects via the API, fetch the workspace or team ID first and include it in the create call; the project wont create without one. Then add tasks one by one against the new project ID. Use a personal access token with the official client rather than basic auth with an API key, which is the legacy pattern.

Context: Stack Overflow #30601424 (accepted answer, 4 votes): the asker wanted to create projects with tasks from Python. The accepted answer: a project create call must include a workspace or team ID, which you look up from the API first, and then tasks are created separately against the new project.