curl
가장 단순한 확인 방법.
논스트리밍
curl https://oneport.kr/v1/chat/completions \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "안녕하세요"}]
}'스트리밍
curl -N https://oneport.kr/v1/chat/completions \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-terra",
"messages": [{"role": "user", "content": "안녕하세요"}],
"stream": true
}'Anthropic 네이티브
curl https://oneport.kr/v1/messages \
-H "x-api-key: $ONEPORT_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "안녕하세요"}]
}'도구 호출#
tools 를 실어 보내기
curl https://oneport.kr/v1/chat/completions \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "서울 날씨 알려줘"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "도시의 지금 날씨",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string" } },
"required": ["city"]
}
}
}]
}'그 밖의 문#
임베딩 · 검열 · 읽어주기
# 임베딩
curl https://oneport.kr/v1/embeddings \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "text-embedding-3-small", "input": "3학년 분수 단원" }'
# 검열 (무료)
curl https://oneport.kr/v1/moderations \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": "검사할 문장" }'
# 읽어주기 (오디오가 그대로 와요)
curl https://oneport.kr/v1/audio/speech \
-H "Authorization: Bearer $ONEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "tts-1", "input": "오늘 급식은 김치찌개입니다.", "voice": "alloy" }' \
--output speech.mp3확인용 두 줄#
요금 없이 되는지 보기
# 지금 부를 수 있는 모델 (종류와 부를 주소까지)
curl https://oneport.kr/v1/models -H "Authorization: Bearer $ONEPORT_API_KEY"
# 잔액
curl https://oneport.kr/v1/credits -H "Authorization: Bearer $ONEPORT_API_KEY"이 문서를 AI 에게 넘기시려면 마크다운 원문을 쓰세요 — 주소 끝에 .md 를 붙이면 나와요.