API question, custom template for gpt4

Hello. I have a question for the API regarding my models for GPT4 (Premium subscription). They are available in the browser, but how can you work with them through the API?

The API is separate billing from ChatGPT, and you must purchase credits in that system to fund use, which does include the latest GPT-4 models.

Here’s an introduction to accounts that doesn’t specifically say the part about “pay us money”, and look at the pricing



The point is not at all that it is paid and so on, I have credits for the API. I’m interested in how to use various GPTs models like ChatGPT 4, DALL-E, Code Guru and others via API requests. I’m developing a project and we really need this, but we can’t find anything in the API

There’s no “code guru”, which might be a GPT that is exclusive to ChatGPT for Plus subscribers - made by a fellow ChatGPT Plus subscriber.

DALL-E image models and GPT-4 models are available by API. API = “Application programming interface” for developers that code AI-based end-user products.

“Documentation” and “API reference” are on this forum’s sidebar.

This is how simple it can be to make a GPT-4 chatbot with computer vision, with Python code:

from openai import OpenAI
client = OpenAI(timeout=120)
system = [{"role": "system", "content": "You are a computer vision assistant"}]
user = [{"role": "user", "content": [{"image": example_base64}, "Write poem based on image."]}]
chat = []
while not user[0]['content'] == "exit":
    response = client.chat.completions.create(
        messages = system + chat[-10:] + user,
        top_p=0.9, stream=True, max_tokens=1536)
    reply = ""
    for delta in response:
        if not delta.choices[0].finish_reason:
            word = delta.choices[0].delta.content or ""
            reply += word
            print(word, end ="")
    chat += user + [{"role": "assistant", "content": reply}]
    user = [{"role": "user", "content": input("\nPrompt: ")}]

Or it can be a $100k money sink of code to get a eCommerce-ready web application developed.

I replaced my script’s startup user input with “write poem based on image”.

That is, you can’t even access your models if you are a CHATGPT PLUS subscriber and have a paid API key on the same account? I was just training my model like “Code guru” for personal purposes and would like to write something using it

A GPT is not a “model” and it is not “trained”.

Go to the customize tab when editing, and you will see that all it is is some text in a text box, and maybe files you uploaded.