Authentication

GetVibe API को requests authorize कैसे करें: sk-pv-… keys, Authorization: Bearer और x-api-key headers, और IP allowlisting। curl, Python और Node में उदाहरण।

हर request आपकी key से authorized होता है, जो sk-pv- से शुरू होती है। दो headers supported हैं — जो भी आपका client expect करता हो, वह चुनें।

Key pass करने के दो तरीके

ParameterTypeविवरण
Authorization: BearerheaderOpenAI / Codex CLI standard। Authorization: Bearer sk-pv-…
x-api-keyheaderAnthropic / Claude Code format। x-api-key: sk-pv-… — वही key।
दोनों headers एक ही key sk-pv-… स्वीकार करते हैं। इनमें से कोई एक भेजना ही पर्याप्त है।

Bearer (OpenAI शैली)

curl https://getvibeapi.com/v1/chat/completions \
  -H "Authorization: Bearer $GETVIBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"ping"}]}'

x-api-key (Anthropic शैली)

# same key, x-api-key header (for Anthropic-format clients such as Claude Code)
curl https://getvibeapi.com/v1/messages \
  -H "x-api-key: $GETVIBE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5.5","max_tokens":256,"messages":[{"role":"user","content":"ping"}]}'

IP अनुमति सूची

एक key पर IP allowlist हो सकती है। अगर सेट हो, तो दूसरे addresses से आने वाली requests को 403 मिलता है। डिफ़ॉल्ट रूप से list खाली रहती है — कोई restriction नहीं। यह आपके dashboard में configure होती है।

की गुम है या गलत है — 401। response codes के बारे में अधिक जानकारी Errors and limits अनुभाग में।
api.openai.com से आने वाला 403 Country, region, or territory not supported का मतलब है कि आपकी GetVibe key नहीं उठाई गई, यह नहीं कि आपके देश में GetVibe blocked है।
GetVibe API authentication — Bearer और x-api-key | GetVibe API