Using DDD in c# and Clean architecture / Onion architecture i have 4 projects API, Application, Domain and Infrastructure. If i have some external api call for example get user profile from github.
interface IGitHubService: Task<GitHubUserProfile> GetProfile(int id);
class GitHubService : IGitHubService { implementation }
Where those 2 should be? I used to create service contracts in Application/Contracts/IGitHubService.cs and implementations in Infrastructure layer.
Where should be placed the GitHubUserProfile, in domain layer, what folder?
Should i create Models folder in Domain layer?
The guiding principle here should be the Dependency Inversion Principle. Your interface should be in the application layer (as you already stated). As a consequence GitHubUserProfile needs to be at least in the application project as well.
Now you have to decide how central the GitHubUserProfile is for your application. If it is just one aspect among many others i would suggest to put it next to IGitHubService.
If it is very central entity for your application I would suggest to move it into the Domain project.
Whether you need folders in your domain project to separate concerns further certainly depends on how much code and how many different concerns you have in this project.