blindpick.ai로 돌아가기Routing API

기존 OpenAI 클라이언트에서
base URL과 API 키만 바꾸세요

Keep using Blind, VS, and Pick on the web. In external services, model: "auto" automates model, provider, and execution-path selection.

API dashboard

API 사용 현황

외부 API 호출만 프로젝트 단위로 집계합니다. 내부 라우팅 규칙과 공급자 정보는 표시하지 않습니다.

API 사용량을 집계하고 있습니다.
Self-service

내 API 키

키 원문은 서버에 저장하지 않으며 생성 직후 한 번만 표시합니다.

계정과 API 키를 확인하고 있습니다.
01

첫 요청

API 키 발급과 호출은 Standard 이상 요금제에서 제공됩니다. 운영 요청은 서버에서 발급한 고객 API 키를 Bearer 토큰으로 전달하며, 키를 브라우저나 앱 번들에 포함하지 마세요.

curl https://blindpick.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $BLINDPICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Summarize this document in three lines"}],
    "router": {"optimize_for": "balanced", "fallback": "approved-models"}
  }'

OpenAI JavaScript SDK

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.BLINDPICK_API_KEY,
  baseURL: "https://blindpick.ai/api/v1"
});

const result = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Analyze the key risks" }]
});

console.log(result.choices[0].message.content);
02

Streaming

stream: true returns OpenAI-compatible SSE deltas and [DONE]. Enable stream_options.include_usage to receive usage in the final chunk.

const stream = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Create a launch checklist" }],
  stream: true,
  stream_options: { include_usage: true }
});

for await (const event of stream) {
  process.stdout.write(event.choices[0]?.delta?.content ?? "");
}
The X-Blindpick-Stream-Mode response header is native or buffered. Use X-Request-Id and X-Blindpick-Decision-Id for support and execution tracing.
03

Routing 옵션

필드용도
modelauto or a model IDAutomatic selection or fixed model
router.optimize_forauto, quality, balanced, latency, throughput, cost, reliability목표를 모델 점수·provider 정렬·폴백 설정으로 자동 변환
router.provider_sortlatency, throughput, priceOpenRouter 사용 시 승인 provider 안에서 정렬
router.presetbalanced, performance, speed, economy이전 버전 호환용 저수준 가중치
router.providerprovider ID지정 시 해당 모델 공급자로 강제 제한
router.data_classgeneral, confidential, restricted데이터 처리 경로 제한
router.fallbackoff, same-model, approved-models실패 시 허용 범위
router.max_cost_usd양수요청당 비용 상한

optimize_for combines intent, Arena-style preference confidence, quality, speed, cost, and provider health to build model and execution settings. Request options cannot weaken the API key's security or cost policy.

Send the same request to POST /api/v1/routes/preview to inspect detected intent, compiled policy, candidate scores, and selection rationale without executing it.
04

오류와 재시도

HTTP의미권장 처리
400요청 또는 정책 제약 오류요청을 수정하고 재시도하지 않음
401 / 403키·scope·권한 오류키와 권한 확인
402크레딧 부족충전 또는 한도 조정
409capability 확인 또는 실행 상태 충돌응답 지시에 따라 명시적 capability 선택
429요청 한도 초과지수 백오프와 jitter 적용
503Temporary provider or service unavailabilityRetry-After — retry sparingly after the indicated time

Errors use error.message, error.type, and error.code. Do not automatically retry payment or permission errors; retry only 429 and 503 responses under the same idempotency conditions.

05

고급 Responses API

Use POST /api/v1/responses for Agent and development tasks beyond chat. First query GET /api/v1/capabilities for features executable by the current key; unavailable capabilities are never silently replaced with ordinary chat.

  • POST /api/v1/responsescreate a synchronous response or background job
  • GET /api/v1/responses/:idretrieve status and result
  • GET /api/v1/responses/:id/eventsprogress event SSE
  • POST /api/v1/responses/:id/cancelcancel a task