Error trying to set up AI on LinqPad 9
Been using AI in LP8 for a while with my OpenAI API key. I just upgraded to LP9, and want to get AI working there.
Not sure if I'm doing this right, as LP9's options for AI are a lot more complex.
I went to the AI section of settings, and clicked the "Add AI provider" button.
As I'm using OpenAI, I clicked the "OpenAI" button, entered by API key and clicked Test, but got a message...
An error occured processing the request.
The OpenAI API returned HTTP error code BadRequest
Your organization must be verified to use the model 'gpt-5.1'. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.
TIP: Organization verification requires uploading ID. You can avoid this by using OpenRouter. OpenRouter gives you access to all popular models - including GPT 5 Reasoning - without needing to upload ID.
LINQPad fully supports OpenRouter - go to Settings (F6) to configure.
I closed that, and back in settings, clicked the "Add AI provider" button again, and this time chose OpenRouter. I entered my API key in the "API key" box and clicked test, but I got a message...
An error occured processing the request.
The OpenRouter API returned HTTP error code Unauthorized
No cookie auth credentials found
Am I doing something wrong?
Thanks
P.S. The second message contains a spelling mistake by the way, it should be "occurred", not "occured" 😁
Answers
-
Can I ask what country you are in? You shouldn't need to be verified to use model gpt-5.1. OpenAI changed this some time ago - verification is required only to see reasoning tokens. As a fallback, though, you can use GPT 5 Chat.
When you set up OpenRouter, did you click Sign Up and Generate Key? It should populate the API automatically when you do this.
