Creating gpt-python chat interface error model

Hello, everyone,
i am trying to create an interface connected with chat gpt 4 that can quickly create books for me from certain inputs.
I am building this interface with Python.

However, I have a problem that I cannot overcome. I am just at the beginning of my work but I can’t find the connection with AI. It always gives me errors (code 404 or even 424) relating to the model.
Sometimes it tells me that it does not exist, sometimes it tells me that I am not entitled because I have to pay. I however have a regular monthly subscription to chat gpt 4.

Can you help me?

Use API call like this:

import os
from openai import OpenAI

client = OpenAI(
    # This is the default and can be omitted

chat_completion =
            "role": "user",
            "content": "Say this is a test",