Can get Openai to respond

Can someone help me? I’m trying to code an app and I cannot get open AI to respond. I don’t know it always comes back where the only thing I can assume is the API is faulty. I don’t know if I’m doing something wrong or if I’m doing something I shouldn’t be doing I don’t know what the deal is can someone help?

please share:

  1. your code snippets in back ticks.

  2. the exact response you are getting from Open AI for an example call.

Do not share you key.

It’s hard to determine what your issue is without this additional information.

The API is working just fine today afaia

Yeah I haven’t been sharing my code I’ve got it routed through the back end and through versal but whenever I test my app it says no response

Not enough information.

Help us help you by helping yourself give us that info.

Well, It would require a more detailed description of the error.

  1. API key:
    – is it a valid, active key?
    – Have you exceeded your quota, or is there no abuse?

  2. Endpoint and method:
    – Are you using the correct endpoint (https://api.openai.com/v1/chat/completions for GPT-4/3.5)?
    – Is it POST, not GET?

  3. Headers:
    – Do you have Authorization: Bearer <API_KEY>?
    – Content-Type: application/json?

  4. Request body:
    – Is there a model: gpt-4 or another?
    – Does it have messages: [{ role: “user”, content: “Hello!” }]?

  5. Error message:
    – What exactly is the server returning? 401? 429? 500?
    – If it “returns nothing”, the error may have its roots in its own network layer.

Thanks for reviewing. Here’s a clean overview:

  1. API Key
    I’m using a real OpenAI API key.
    I haven’t exceeded my quota, and as far as I know, there’s no abuse flag.
    However, I don’t know how to get an API key that doesn’t start with proj_,
    and I’m not sure how to determine what type of key I currently have.

  2. Endpoint and Method
    I’m sending a POST request to this endpoint:
    Cant include link
    Not using GET — method is correctly set to POST.

  3. Headers
    The following headers are present and correctly formatted:

Authorization: Bearer [my_API_key]

Content-Type: application/json

  1. Request Body
    The body contains the model and a sample message like this:

model: gpt-4

messages: [{ role: “user”, content: “Hello!” }]
I’ve also tried with gpt-3.5-turbo.

  1. Error Response
    The responses I’ve received are:

401 Unauthorized

404 Not Found
No 500 errors have occurred.
The 401 likely points to an issue with the key or how it’s being passed.
The 404 may indicate something wrong with the endpoint or structure,
but I’ve reviewed that part and it seems accurate.

I have had some thoughts on this so I would like to add that I am creating a speak back from the app I’m building if that may create a difference. As I’m writing this that thought occurred to me that that might be a problem.

Let me know if there’s something else you need clarified. Thank you

Why are you essentially duplicating my prior response and not even acknowledging it?

Do you say duplication?

Well, I performed a sha256 fingerprint on both of our answers:

A:
4a17b7bbfce92fba6ae3164c6ae1135e8ecbdde7d1e2894f9a4ad87f30d9114a

B:
4d9393ff03791f763167c6bb1a1e08f787a73ffba37aa3c07084f9e64de82e7f

Metrics Result
Levenshtein Distance 56
Text Length A vs B 103 vs 69 characters
Jaccard Similarity (on words) 0.23
Cosine Similarity (TF-IDF, EN) ~0.19
Feature Fingerprint A Fingerprint B
Style Colloquial, informal, slightly directive More formal, professional tone
Grammar Shorter sentences, second person (“you”) Third person, more descriptive structure
Subtext Slightly passive-aggressive call for initiative Unbiased recommendation for a more accurate description of the error

A highly disingenuous response.

Oh the irony.