Using secrets and inputs together

Is it possible to have something like target_arch :[ {{ github.event.inputs.arch}}] and also can I use levels and secrets together like env : | API_ID: {{ github.event.inputs.API_ID }}
And in the input I pass {{ secrets.API_ID1 }} or {{ secrets.API_ID2 }} depending on situation?
Also how to trigger workflow_dispatch from github api with inputs?