Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

claude-webapi

> 编程语言
Open source

claude webapi sdk, support claude2

100 stars0 likes0 views
WebsiteGitHub

About

claude webapi sdk, support claude2

claude-webapi

claude webapi sdk writen by golang.

support the latest claude-2 model.

Preparation

  • Your sessionKey

you should login into the Claude Website firstly, find the Cookie named sessionKey, and copy it's value.

  • Your orgid

you can find your orgid in the Network panel.

Quick Start

  1. install claude-webapi sdk
bash
go get -u github.com/all-in-aigc/claude-webapi
  1. a quick demo for chatting with claude webapi
…

Other use cases

  • Get Organizations
go
cli := getClient()

res, err := cli.GetOrganizations()

if err != nil {
	log.Fatalf("get orgs fail: %v\n", err)
}

for _, v := range res.Array() {
	orgid := v.Get("uuid").String()
	log.Printf("orgid: %s\n", orgid)
}
  • New Conversation
go
conversationId := uuid.New().String()
name := "my conversation"

cli := getClient()
params := map[string]interface{}{
	"name": name,
	"uuid": conversationId,
}

res, err := cli.NewConversation(params)
if err != nil {
	log.Fatalf("new conversation fail: %v\n", err)
}

conversationName := res.Get("name").String()
log.Printf("conversation name: %s\n", conversationName)
  • Get Conversations
go
cli := getClient()

res, err := cli.GetConversations()

if err != nil {
	log.Fatalf("get conversations fail: %v\n", err)
}

for _, v := range res.Array() {
	conversationId := v.Get("uuid").String()
	conversationName := v.Get("name").String()
	log.Printf("conversation: %s, %s\n", conversationId, conversationName)
}
  • Chat With Attachments
…

Tests

Test cases are under the ./examples folder, you can test them by go test.

Communication

  • Telegram Group: all in AIGC

  • Discord Server: all in AIGC

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言