SawyerHood / windows9x

It is windows, but all of the apps are ai generated.
https://windows9x.com
GNU Affero General Public License v3.0
158 stars 9 forks source link

POST /api/name 500 in 1039ms #14

Closed Thisik closed 3 months ago

Thisik commented 3 months ago

I have valid API key but: POST /api/name 500 in 1039ms

My .env file: ANTHROPIC_API_KEY="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" NEXT_PUBLIC_LOCAL_MODE=true

My console: `⨯ BadRequestError: 400 Your credit balance is too low to access the Claude API. Please go to Plans & Billing to upgrade or purchase credits. at APIError.generate (webpack-internal:///(rsc)/./node_modules/openai/error.mjs:58:20) at OpenAI.makeStatusError (webpack-internal:///(rsc)/./node_modules/openai/core.mjs:292:65) at OpenAI.makeRequest (webpack-internal:///(rsc)/./node_modules/openai/core.mjs:335:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async eval (webpack-internal:///(rsc)/./ai/createCompletion.ts:20:16) at async eval (webpack-internal:///(rsc)/./node_modules/braintrust/dist/index.js:16252:26) at async createCompletion (webpack-internal:///(rsc)/./ai/createCompletion.ts:11:12) at async POST (webpack-internal:///(rsc)/./app/api/name/route.ts:41:22) at async /Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:55038 at async ek.execute (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:45808) at async ek.handle (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:56292) at async doRender (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:1377:42) at async cacheEntry.responseCache.get.routeKind (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:1599:28) at async DevServer.renderToResponseWithComponentsImpl (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:1507:28) at async DevServer.renderPageComponent (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:1931:24) at async DevServer.renderToResponseImpl (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:1969:32) at async DevServer.pipeImpl (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:920:25) at async NextNodeServer.handleCatchallRenderRequest (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/next-server.js:272:17) at async DevServer.handleRequestImpl (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/base-server.js:816:17) at async /Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/dev/next-dev-server.js:339:20 at async Span.traceAsyncFn (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/trace/trace.js:154:20) at async DevServer.handleRequest (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/dev/next-dev-server.js:336:24) at async invokeRender (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/lib/router-server.js:174:21) at async handleRequest (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/lib/router-server.js:353:24) at async requestHandlerImpl (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/lib/router-server.js:377:13) at async Server.requestListener (/Users/michalschneider/Downloads/windows9x-main/node_modules/next/dist/server/lib/start-server.js:141:13) { status: 400, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '8a7c26067f3d975a-FRA', connection: 'keep-alive', 'content-type': 'application/json', date: 'Tue, 23 Jul 2024 13:52:01 GMT', nel: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 'report-to': '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=4jeemNJhROWkVk9mMV%2F6vRnMYNuV0u6hRutVPzdHgzoOdYwnbVJ3IsepkzXYlVsu7BTSEkZsRnXCz5GyPqBOxS2I4x%2Bv97kxJQmzaO62UYLnoYRdH7SREcFBjs2FOZJTVc4yvKGA"}],"group":"cf-nel","max_age":604800}', 'request-id': 'req_01SrCFR784B8fHeuPsp7wbML', server: 'cloudflare', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding', via: '1.1 google', 'x-bt-cached': 'MISS', 'x-cached': 'false', 'x-cloud-trace-context': '127c05fe78b7c76b8fe0f9137db85beb', 'x-should-retry': 'false' }, request_id: undefined, error: { type: 'invalid_request_error', message: 'Your credit balance is too low to access the Claude API. Please go to Plans & Billing to upgrade or purchase credits.' }, code: undefined, param: undefined, type: 'invalid_request_error' } POST /api/name 500 in 1039ms

` PS: I WILL NEVER PAY FOR TOKENS!

SawyerHood commented 3 months ago

Yeah you need to buy credits from anthropic