How can I insert data into two different tables with a single request?

Might be a little misunderstanding with what I’m trying to do.
So I want to create an object through the API. When i’m creating this object, i want to create multiples of a different object, which is related to the first object create, during the same request.

So with the request i create this “main” object and additionally multiples of another object related to the “main” object.