@Valentina Suescun Arias I'm glad to hear that the issue is now resolved.
Thanks for posting your solution so that others experiencing the same thing can easily reference this. Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.
.
Issue:
You were getting this error Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
in the Azure openai studio.
.
Resolution:
This was a transient issue. After an hour the service worked fine as expected.