Skip to content

Latest commit

 

History

History
101 lines (64 loc) · 3.95 KB

README.md

File metadata and controls

101 lines (64 loc) · 3.95 KB

One API

The original author of one-api has not been active for a long time, resulting in a backlog of PRs that cannot be updated. Therefore, I forked the code and merged some PRs that I consider important. I also welcome everyone to submit PRs, and I will respond and handle them actively and quickly.

Fully compatible with the upstream version, can be used directly by replacing the container image, docker images:

  • ppcelery/one-api:latest
  • ppcelery/one-api:arm64-latest

Menu

New Features

(Merged) Support gpt-vision

Support update user's remained quota

You can update the used quota using the API key of any token, allowing other consumption to be aggregated into the one-api for centralized management.

(Merged) Support aws claude

Support openai images edits

Support gemini-2.0-flash-exp

Support replicate flux & remix

Support replicate chat models

Support OpenAI O1/O1-mini/O1-preview

Get request's cost

Each chat completion request will include a X-Oneapi-Request-Id in the returned headers. You can use this request id to request GET /api/cost/request/:request_id to get the cost of this request.

The returned structure is:

type UserRequestCost struct {
  Id          int     `json:"id"`
  CreatedTime int64   `json:"created_time" gorm:"bigint"`
  UserID      int     `json:"user_id"`
  RequestID   string  `json:"request_id"`
  Quota       int64   `json:"quota"`
  CostUSD     float64 `json:"cost_usd" gorm:"-"`
}

Bug fix

The token balance cannot be edited

Whisper's transcription only charges for the length of the input audio