mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
23 lines
340 B
Go
23 lines
340 B
Go
package client
|
|
|
|
const apiEndpoint = "https://api.elevenlabs.io"
|
|
|
|
var ErrUnauthorized error
|
|
|
|
type Client struct {
|
|
apiKey string
|
|
endpoint string
|
|
}
|
|
|
|
func New(apiKey string) Client {
|
|
return Client{
|
|
apiKey: apiKey,
|
|
endpoint: apiEndpoint,
|
|
}
|
|
}
|
|
|
|
func (c Client) WithEndpoint(endpoint string) Client {
|
|
c.endpoint = endpoint
|
|
return c
|
|
}
|