api

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRolesForApiSecret

func GetRolesForApiSecret(operation string) []string

GetRolesForApiSecret returns the required roles for the given operation.

This is useful for authorization scenarios where you need to know which roles are required for an operation.

Example:

requiredRoles := GetRolesForApiSecret(AddPetOperation)

Returns nil if the operation has no role requirements or if the operation is unknown.

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Agent

type Agent struct {
	// Unique agent identifier.
	ID string `json:"id"`
	// Agent display name.
	Name OptString `json:"name"`
	// Agent generation status.
	Status AgentStatus `json:"status"`
	// Agent personality prompt.
	Prompt OptString `json:"prompt"`
	// Avatar model type.
	ModelType OptAgentModelType `json:"model_type"`
	// Agent portrait image URL.
	PortraitURL OptURI      `json:"portrait_url"`
	CreatedAt   OptDateTime `json:"created_at"`
	UpdatedAt   OptDateTime `json:"updated_at"`
}

Ref: #/components/schemas/Agent

func (*Agent) Decode

func (s *Agent) Decode(d *jx.Decoder) error

Decode decodes Agent from json.

func (*Agent) Encode

func (s *Agent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Agent) GetCreatedAt

func (s *Agent) GetCreatedAt() OptDateTime

GetCreatedAt returns the value of CreatedAt.

func (*Agent) GetID

func (s *Agent) GetID() string

GetID returns the value of ID.

func (*Agent) GetModelType

func (s *Agent) GetModelType() OptAgentModelType

GetModelType returns the value of ModelType.

func (*Agent) GetName

func (s *Agent) GetName() OptString

GetName returns the value of Name.

func (*Agent) GetPortraitURL

func (s *Agent) GetPortraitURL() OptURI

GetPortraitURL returns the value of PortraitURL.

func (*Agent) GetPrompt

func (s *Agent) GetPrompt() OptString

GetPrompt returns the value of Prompt.

func (*Agent) GetStatus

func (s *Agent) GetStatus() AgentStatus

GetStatus returns the value of Status.

func (*Agent) GetUpdatedAt

func (s *Agent) GetUpdatedAt() OptDateTime

GetUpdatedAt returns the value of UpdatedAt.

func (*Agent) MarshalJSON

func (s *Agent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Agent) SetCreatedAt

func (s *Agent) SetCreatedAt(val OptDateTime)

SetCreatedAt sets the value of CreatedAt.

func (*Agent) SetID

func (s *Agent) SetID(val string)

SetID sets the value of ID.

func (*Agent) SetModelType

func (s *Agent) SetModelType(val OptAgentModelType)

SetModelType sets the value of ModelType.

func (*Agent) SetName

func (s *Agent) SetName(val OptString)

SetName sets the value of Name.

func (*Agent) SetPortraitURL

func (s *Agent) SetPortraitURL(val OptURI)

SetPortraitURL sets the value of PortraitURL.

func (*Agent) SetPrompt

func (s *Agent) SetPrompt(val OptString)

SetPrompt sets the value of Prompt.

func (*Agent) SetStatus

func (s *Agent) SetStatus(val AgentStatus)

SetStatus sets the value of Status.

func (*Agent) SetUpdatedAt

func (s *Agent) SetUpdatedAt(val OptDateTime)

SetUpdatedAt sets the value of UpdatedAt.

func (*Agent) UnmarshalJSON

func (s *Agent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Agent) Validate

func (s *Agent) Validate() error

type AgentList

type AgentList struct {
	Agents []Agent `json:"agents"`
	Total  OptInt  `json:"total"`
	Limit  OptInt  `json:"limit"`
	Offset OptInt  `json:"offset"`
}

Ref: #/components/schemas/AgentList

func (*AgentList) Decode

func (s *AgentList) Decode(d *jx.Decoder) error

Decode decodes AgentList from json.

func (*AgentList) Encode

func (s *AgentList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AgentList) GetAgents

func (s *AgentList) GetAgents() []Agent

GetAgents returns the value of Agents.

func (*AgentList) GetLimit

func (s *AgentList) GetLimit() OptInt

GetLimit returns the value of Limit.

func (*AgentList) GetOffset

func (s *AgentList) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*AgentList) GetTotal

func (s *AgentList) GetTotal() OptInt

GetTotal returns the value of Total.

func (*AgentList) MarshalJSON

func (s *AgentList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AgentList) SetAgents

func (s *AgentList) SetAgents(val []Agent)

SetAgents sets the value of Agents.

func (*AgentList) SetLimit

func (s *AgentList) SetLimit(val OptInt)

SetLimit sets the value of Limit.

func (*AgentList) SetOffset

func (s *AgentList) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*AgentList) SetTotal

func (s *AgentList) SetTotal(val OptInt)

SetTotal sets the value of Total.

func (*AgentList) UnmarshalJSON

func (s *AgentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AgentList) Validate

func (s *AgentList) Validate() error

type AgentModelType

type AgentModelType string

Avatar model type.

const (
	AgentModelTypeEssence    AgentModelType = "essence"
	AgentModelTypeExpression AgentModelType = "expression"
)

func (AgentModelType) AllValues

func (AgentModelType) AllValues() []AgentModelType

AllValues returns all AgentModelType values.

func (*AgentModelType) Decode

func (s *AgentModelType) Decode(d *jx.Decoder) error

Decode decodes AgentModelType from json.

func (AgentModelType) Encode

func (s AgentModelType) Encode(e *jx.Encoder)

Encode encodes AgentModelType as json.

func (AgentModelType) MarshalJSON

func (s AgentModelType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (AgentModelType) MarshalText

func (s AgentModelType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*AgentModelType) UnmarshalJSON

func (s *AgentModelType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AgentModelType) UnmarshalText

func (s *AgentModelType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (AgentModelType) Validate

func (s AgentModelType) Validate() error

type AgentStatus

type AgentStatus string

Agent generation status.

const (
	AgentStatusPending    AgentStatus = "pending"
	AgentStatusProcessing AgentStatus = "processing"
	AgentStatusReady      AgentStatus = "ready"
	AgentStatusFailed     AgentStatus = "failed"
)

func (AgentStatus) AllValues

func (AgentStatus) AllValues() []AgentStatus

AllValues returns all AgentStatus values.

func (*AgentStatus) Decode

func (s *AgentStatus) Decode(d *jx.Decoder) error

Decode decodes AgentStatus from json.

func (AgentStatus) Encode

func (s AgentStatus) Encode(e *jx.Encoder)

Encode encodes AgentStatus as json.

func (AgentStatus) MarshalJSON

func (s AgentStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (AgentStatus) MarshalText

func (s AgentStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*AgentStatus) UnmarshalJSON

func (s *AgentStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AgentStatus) UnmarshalText

func (s *AgentStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (AgentStatus) Validate

func (s AgentStatus) Validate() error

type ApiSecret

type ApiSecret struct {
	APIKey string
	Roles  []string
}

func (*ApiSecret) GetAPIKey

func (s *ApiSecret) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*ApiSecret) GetRoles

func (s *ApiSecret) GetRoles() []string

GetRoles returns the value of Roles.

func (*ApiSecret) SetAPIKey

func (s *ApiSecret) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

func (*ApiSecret) SetRoles

func (s *ApiSecret) SetRoles(val []string)

SetRoles sets the value of Roles.

type Balance

type Balance struct {
	// Available credits.
	Credits OptFloat64 `json:"credits"`
	// Estimated minutes by model type.
	MinutesEstimate OptBalanceMinutesEstimate `json:"minutes_estimate"`
}

Ref: #/components/schemas/Balance

func (*Balance) Decode

func (s *Balance) Decode(d *jx.Decoder) error

Decode decodes Balance from json.

func (*Balance) Encode

func (s *Balance) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Balance) GetCredits

func (s *Balance) GetCredits() OptFloat64

GetCredits returns the value of Credits.

func (*Balance) GetMinutesEstimate

func (s *Balance) GetMinutesEstimate() OptBalanceMinutesEstimate

GetMinutesEstimate returns the value of MinutesEstimate.

func (*Balance) MarshalJSON

func (s *Balance) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Balance) SetCredits

func (s *Balance) SetCredits(val OptFloat64)

SetCredits sets the value of Credits.

func (*Balance) SetMinutesEstimate

func (s *Balance) SetMinutesEstimate(val OptBalanceMinutesEstimate)

SetMinutesEstimate sets the value of MinutesEstimate.

func (*Balance) UnmarshalJSON

func (s *Balance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Balance) Validate

func (s *Balance) Validate() error

type BalanceMinutesEstimate

type BalanceMinutesEstimate struct {
	Essence    OptFloat64 `json:"essence"`
	Expression OptFloat64 `json:"expression"`
}

Estimated minutes by model type.

func (*BalanceMinutesEstimate) Decode

func (s *BalanceMinutesEstimate) Decode(d *jx.Decoder) error

Decode decodes BalanceMinutesEstimate from json.

func (*BalanceMinutesEstimate) Encode

func (s *BalanceMinutesEstimate) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BalanceMinutesEstimate) GetEssence

func (s *BalanceMinutesEstimate) GetEssence() OptFloat64

GetEssence returns the value of Essence.

func (*BalanceMinutesEstimate) GetExpression

func (s *BalanceMinutesEstimate) GetExpression() OptFloat64

GetExpression returns the value of Expression.

func (*BalanceMinutesEstimate) MarshalJSON

func (s *BalanceMinutesEstimate) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BalanceMinutesEstimate) SetEssence

func (s *BalanceMinutesEstimate) SetEssence(val OptFloat64)

SetEssence sets the value of Essence.

func (*BalanceMinutesEstimate) SetExpression

func (s *BalanceMinutesEstimate) SetExpression(val OptFloat64)

SetExpression sets the value of Expression.

func (*BalanceMinutesEstimate) UnmarshalJSON

func (s *BalanceMinutesEstimate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*BalanceMinutesEstimate) Validate

func (s *BalanceMinutesEstimate) Validate() error

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) CreateAgent

func (c *Client) CreateAgent(ctx context.Context, request *CreateAgentRequest) (CreateAgentRes, error)

CreateAgent invokes createAgent operation.

Generate a new avatar agent from a text prompt with optional image/audio. Returns immediately with agent ID; use GET /v1/agents/{id} to poll status.

POST /v1/agents

func (*Client) CreateEmbedToken

func (c *Client) CreateEmbedToken(ctx context.Context, request *CreateEmbedTokenRequest) (CreateEmbedTokenRes, error)

CreateEmbedToken invokes createEmbedToken operation.

Mint a short-lived JWT for embedding avatar in websites.

POST /v1/embed/token

func (*Client) CreateSession

func (c *Client) CreateSession(ctx context.Context, request *CreateSessionRequest) (CreateSessionRes, error)

CreateSession invokes createSession operation.

Create a new real-time conversation session with an agent. Returns connection details for WebRTC/LiveKit.

POST /v1/sessions

func (*Client) CreateVideo

func (c *Client) CreateVideo(ctx context.Context, request *CreateVideoRequest) (CreateVideoRes, error)

CreateVideo invokes createVideo operation.

Generate an MP4 talking video from text or audio. This is an async operation; poll GET /v1/videos/{id} for status.

POST /v1/videos

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(ctx context.Context, request *CreateWebhookRequest) (CreateWebhookRes, error)

CreateWebhook invokes createWebhook operation.

Create webhook.

POST /v1/webhooks

func (*Client) DeleteAgent

func (c *Client) DeleteAgent(ctx context.Context, params DeleteAgentParams) (DeleteAgentRes, error)

DeleteAgent invokes deleteAgent operation.

Delete agent.

DELETE /v1/agents/{agentId}

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(ctx context.Context, params DeleteWebhookParams) (DeleteWebhookRes, error)

DeleteWebhook invokes deleteWebhook operation.

Delete webhook.

DELETE /v1/webhooks/{webhookId}

func (*Client) EndSession

func (c *Client) EndSession(ctx context.Context, params EndSessionParams) (EndSessionRes, error)

EndSession invokes endSession operation.

End a session.

DELETE /v1/sessions/{sessionId}

func (*Client) GetAgent

func (c *Client) GetAgent(ctx context.Context, params GetAgentParams) (GetAgentRes, error)

GetAgent invokes getAgent operation.

Get agent details.

GET /v1/agents/{agentId}

func (*Client) GetBalance

func (c *Client) GetBalance(ctx context.Context) (GetBalanceRes, error)

GetBalance invokes getBalance operation.

Get account balance.

GET /v1/billing/balance

func (*Client) GetSession

func (c *Client) GetSession(ctx context.Context, params GetSessionParams) (GetSessionRes, error)

GetSession invokes getSession operation.

Get session details.

GET /v1/sessions/{sessionId}

func (*Client) GetVideo

func (c *Client) GetVideo(ctx context.Context, params GetVideoParams) (GetVideoRes, error)

GetVideo invokes getVideo operation.

Get video job status.

GET /v1/videos/{videoId}

func (*Client) ListAgents

func (c *Client) ListAgents(ctx context.Context, params ListAgentsParams) (ListAgentsRes, error)

ListAgents invokes listAgents operation.

List all agents.

GET /v1/agents

func (*Client) ListVoices

func (c *Client) ListVoices(ctx context.Context) (ListVoicesRes, error)

ListVoices invokes listVoices operation.

List available voices.

GET /v1/voices

func (*Client) ListWebhooks

func (c *Client) ListWebhooks(ctx context.Context) (ListWebhooksRes, error)

ListWebhooks invokes listWebhooks operation.

List webhooks.

GET /v1/webhooks

func (*Client) Speak

func (c *Client) Speak(ctx context.Context, request *SpeakRequest, params SpeakParams) (SpeakRes, error)

Speak invokes speak operation.

Send text for the agent to speak with lip-sync.

POST /v1/agents/{agentId}/speak

func (*Client) TextToSpeech

func (c *Client) TextToSpeech(ctx context.Context, request *TTSRequest) (TextToSpeechRes, error)

TextToSpeech invokes textToSpeech operation.

Convert text to audio using bitHuman TTS.

POST /v1/tts

func (*Client) UpdateAgent

func (c *Client) UpdateAgent(ctx context.Context, request *UpdateAgentRequest, params UpdateAgentParams) (UpdateAgentRes, error)

UpdateAgent invokes updateAgent operation.

Update agent.

PATCH /v1/agents/{agentId}

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, request *UploadFileRequest) (UploadFileRes, error)

UploadFile invokes uploadFile operation.

Upload images, video, audio, or documents.

POST /v1/files

func (*Client) Validate

func (c *Client) Validate(ctx context.Context) (ValidateRes, error)

Validate invokes validate operation.

Cheapest way to verify API key is valid.

POST /v1/validate

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type CreateAgentBadRequest

type CreateAgentBadRequest Error

func (*CreateAgentBadRequest) Decode

func (s *CreateAgentBadRequest) Decode(d *jx.Decoder) error

Decode decodes CreateAgentBadRequest from json.

func (*CreateAgentBadRequest) Encode

func (s *CreateAgentBadRequest) Encode(e *jx.Encoder)

Encode encodes CreateAgentBadRequest as json.

func (*CreateAgentBadRequest) MarshalJSON

func (s *CreateAgentBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateAgentBadRequest) UnmarshalJSON

func (s *CreateAgentBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateAgentRequest

type CreateAgentRequest struct {
	// Agent display name.
	Name OptString `json:"name"`
	// Agent personality prompt.
	Prompt OptString `json:"prompt"`
	// Portrait image URL.
	PortraitURL OptURI `json:"portrait_url"`
	// Portrait image as base64.
	PortraitBase64 OptString `json:"portrait_base64"`
	// Avatar model type.
	ModelType OptCreateAgentRequestModelType `json:"model_type"`
}

Ref: #/components/schemas/CreateAgentRequest

func (*CreateAgentRequest) Decode

func (s *CreateAgentRequest) Decode(d *jx.Decoder) error

Decode decodes CreateAgentRequest from json.

func (*CreateAgentRequest) Encode

func (s *CreateAgentRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateAgentRequest) GetModelType

GetModelType returns the value of ModelType.

func (*CreateAgentRequest) GetName

func (s *CreateAgentRequest) GetName() OptString

GetName returns the value of Name.

func (*CreateAgentRequest) GetPortraitBase64

func (s *CreateAgentRequest) GetPortraitBase64() OptString

GetPortraitBase64 returns the value of PortraitBase64.

func (*CreateAgentRequest) GetPortraitURL

func (s *CreateAgentRequest) GetPortraitURL() OptURI

GetPortraitURL returns the value of PortraitURL.

func (*CreateAgentRequest) GetPrompt

func (s *CreateAgentRequest) GetPrompt() OptString

GetPrompt returns the value of Prompt.

func (*CreateAgentRequest) MarshalJSON

func (s *CreateAgentRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateAgentRequest) SetModelType

SetModelType sets the value of ModelType.

func (*CreateAgentRequest) SetName

func (s *CreateAgentRequest) SetName(val OptString)

SetName sets the value of Name.

func (*CreateAgentRequest) SetPortraitBase64

func (s *CreateAgentRequest) SetPortraitBase64(val OptString)

SetPortraitBase64 sets the value of PortraitBase64.

func (*CreateAgentRequest) SetPortraitURL

func (s *CreateAgentRequest) SetPortraitURL(val OptURI)

SetPortraitURL sets the value of PortraitURL.

func (*CreateAgentRequest) SetPrompt

func (s *CreateAgentRequest) SetPrompt(val OptString)

SetPrompt sets the value of Prompt.

func (*CreateAgentRequest) UnmarshalJSON

func (s *CreateAgentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateAgentRequest) Validate

func (s *CreateAgentRequest) Validate() error

type CreateAgentRequestModelType

type CreateAgentRequestModelType string

Avatar model type.

const (
	CreateAgentRequestModelTypeEssence    CreateAgentRequestModelType = "essence"
	CreateAgentRequestModelTypeExpression CreateAgentRequestModelType = "expression"
)

func (CreateAgentRequestModelType) AllValues

AllValues returns all CreateAgentRequestModelType values.

func (*CreateAgentRequestModelType) Decode

Decode decodes CreateAgentRequestModelType from json.

func (CreateAgentRequestModelType) Encode

func (s CreateAgentRequestModelType) Encode(e *jx.Encoder)

Encode encodes CreateAgentRequestModelType as json.

func (CreateAgentRequestModelType) MarshalJSON

func (s CreateAgentRequestModelType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (CreateAgentRequestModelType) MarshalText

func (s CreateAgentRequestModelType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*CreateAgentRequestModelType) UnmarshalJSON

func (s *CreateAgentRequestModelType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateAgentRequestModelType) UnmarshalText

func (s *CreateAgentRequestModelType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (CreateAgentRequestModelType) Validate

func (s CreateAgentRequestModelType) Validate() error

type CreateAgentRes

type CreateAgentRes interface {
	// contains filtered or unexported methods
}

type CreateAgentUnauthorized

type CreateAgentUnauthorized Error

func (*CreateAgentUnauthorized) Decode

func (s *CreateAgentUnauthorized) Decode(d *jx.Decoder) error

Decode decodes CreateAgentUnauthorized from json.

func (*CreateAgentUnauthorized) Encode

func (s *CreateAgentUnauthorized) Encode(e *jx.Encoder)

Encode encodes CreateAgentUnauthorized as json.

func (*CreateAgentUnauthorized) MarshalJSON

func (s *CreateAgentUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateAgentUnauthorized) UnmarshalJSON

func (s *CreateAgentUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateEmbedTokenRequest

type CreateEmbedTokenRequest struct {
	AgentID string `json:"agent_id"`
	// Token time-to-live.
	TTLSeconds OptInt `json:"ttl_seconds"`
}

Ref: #/components/schemas/CreateEmbedTokenRequest

func (*CreateEmbedTokenRequest) Decode

func (s *CreateEmbedTokenRequest) Decode(d *jx.Decoder) error

Decode decodes CreateEmbedTokenRequest from json.

func (*CreateEmbedTokenRequest) Encode

func (s *CreateEmbedTokenRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateEmbedTokenRequest) GetAgentID

func (s *CreateEmbedTokenRequest) GetAgentID() string

GetAgentID returns the value of AgentID.

func (*CreateEmbedTokenRequest) GetTTLSeconds

func (s *CreateEmbedTokenRequest) GetTTLSeconds() OptInt

GetTTLSeconds returns the value of TTLSeconds.

func (*CreateEmbedTokenRequest) MarshalJSON

func (s *CreateEmbedTokenRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateEmbedTokenRequest) SetAgentID

func (s *CreateEmbedTokenRequest) SetAgentID(val string)

SetAgentID sets the value of AgentID.

func (*CreateEmbedTokenRequest) SetTTLSeconds

func (s *CreateEmbedTokenRequest) SetTTLSeconds(val OptInt)

SetTTLSeconds sets the value of TTLSeconds.

func (*CreateEmbedTokenRequest) UnmarshalJSON

func (s *CreateEmbedTokenRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateEmbedTokenRes

type CreateEmbedTokenRes interface {
	// contains filtered or unexported methods
}

type CreateSessionBadRequest

type CreateSessionBadRequest Error

func (*CreateSessionBadRequest) Decode

func (s *CreateSessionBadRequest) Decode(d *jx.Decoder) error

Decode decodes CreateSessionBadRequest from json.

func (*CreateSessionBadRequest) Encode

func (s *CreateSessionBadRequest) Encode(e *jx.Encoder)

Encode encodes CreateSessionBadRequest as json.

func (*CreateSessionBadRequest) MarshalJSON

func (s *CreateSessionBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateSessionBadRequest) UnmarshalJSON

func (s *CreateSessionBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateSessionRequest

type CreateSessionRequest struct {
	// Agent to use for this session.
	AgentID string `json:"agent_id"`
	// Optional external LiveKit URL.
	LivekitURL OptString `json:"livekit_url"`
	// Optional external LiveKit token.
	LivekitToken OptString `json:"livekit_token"`
}

Ref: #/components/schemas/CreateSessionRequest

func (*CreateSessionRequest) Decode

func (s *CreateSessionRequest) Decode(d *jx.Decoder) error

Decode decodes CreateSessionRequest from json.

func (*CreateSessionRequest) Encode

func (s *CreateSessionRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateSessionRequest) GetAgentID

func (s *CreateSessionRequest) GetAgentID() string

GetAgentID returns the value of AgentID.

func (*CreateSessionRequest) GetLivekitToken

func (s *CreateSessionRequest) GetLivekitToken() OptString

GetLivekitToken returns the value of LivekitToken.

func (*CreateSessionRequest) GetLivekitURL

func (s *CreateSessionRequest) GetLivekitURL() OptString

GetLivekitURL returns the value of LivekitURL.

func (*CreateSessionRequest) MarshalJSON

func (s *CreateSessionRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateSessionRequest) SetAgentID

func (s *CreateSessionRequest) SetAgentID(val string)

SetAgentID sets the value of AgentID.

func (*CreateSessionRequest) SetLivekitToken

func (s *CreateSessionRequest) SetLivekitToken(val OptString)

SetLivekitToken sets the value of LivekitToken.

func (*CreateSessionRequest) SetLivekitURL

func (s *CreateSessionRequest) SetLivekitURL(val OptString)

SetLivekitURL sets the value of LivekitURL.

func (*CreateSessionRequest) UnmarshalJSON

func (s *CreateSessionRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateSessionRes

type CreateSessionRes interface {
	// contains filtered or unexported methods
}

type CreateSessionUnauthorized

type CreateSessionUnauthorized Error

func (*CreateSessionUnauthorized) Decode

func (s *CreateSessionUnauthorized) Decode(d *jx.Decoder) error

Decode decodes CreateSessionUnauthorized from json.

func (*CreateSessionUnauthorized) Encode

func (s *CreateSessionUnauthorized) Encode(e *jx.Encoder)

Encode encodes CreateSessionUnauthorized as json.

func (*CreateSessionUnauthorized) MarshalJSON

func (s *CreateSessionUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateSessionUnauthorized) UnmarshalJSON

func (s *CreateSessionUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateVideoBadRequest

type CreateVideoBadRequest Error

func (*CreateVideoBadRequest) Decode

func (s *CreateVideoBadRequest) Decode(d *jx.Decoder) error

Decode decodes CreateVideoBadRequest from json.

func (*CreateVideoBadRequest) Encode

func (s *CreateVideoBadRequest) Encode(e *jx.Encoder)

Encode encodes CreateVideoBadRequest as json.

func (*CreateVideoBadRequest) MarshalJSON

func (s *CreateVideoBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateVideoBadRequest) UnmarshalJSON

func (s *CreateVideoBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateVideoRequest

type CreateVideoRequest struct {
	// Agent ID.
	AgentID string `json:"agent_id"`
	// Script text (mutually exclusive with audio_url).
	Text OptString `json:"text"`
	// Audio URL (mutually exclusive with text).
	AudioURL OptURI `json:"audio_url"`
	// Voice ID for TTS (when using text).
	VoiceID OptString `json:"voice_id"`
}

Ref: #/components/schemas/CreateVideoRequest

func (*CreateVideoRequest) Decode

func (s *CreateVideoRequest) Decode(d *jx.Decoder) error

Decode decodes CreateVideoRequest from json.

func (*CreateVideoRequest) Encode

func (s *CreateVideoRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateVideoRequest) GetAgentID

func (s *CreateVideoRequest) GetAgentID() string

GetAgentID returns the value of AgentID.

func (*CreateVideoRequest) GetAudioURL

func (s *CreateVideoRequest) GetAudioURL() OptURI

GetAudioURL returns the value of AudioURL.

func (*CreateVideoRequest) GetText

func (s *CreateVideoRequest) GetText() OptString

GetText returns the value of Text.

func (*CreateVideoRequest) GetVoiceID

func (s *CreateVideoRequest) GetVoiceID() OptString

GetVoiceID returns the value of VoiceID.

func (*CreateVideoRequest) MarshalJSON

func (s *CreateVideoRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateVideoRequest) SetAgentID

func (s *CreateVideoRequest) SetAgentID(val string)

SetAgentID sets the value of AgentID.

func (*CreateVideoRequest) SetAudioURL

func (s *CreateVideoRequest) SetAudioURL(val OptURI)

SetAudioURL sets the value of AudioURL.

func (*CreateVideoRequest) SetText

func (s *CreateVideoRequest) SetText(val OptString)

SetText sets the value of Text.

func (*CreateVideoRequest) SetVoiceID

func (s *CreateVideoRequest) SetVoiceID(val OptString)

SetVoiceID sets the value of VoiceID.

func (*CreateVideoRequest) UnmarshalJSON

func (s *CreateVideoRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateVideoRes

type CreateVideoRes interface {
	// contains filtered or unexported methods
}

type CreateVideoUnauthorized

type CreateVideoUnauthorized Error

func (*CreateVideoUnauthorized) Decode

func (s *CreateVideoUnauthorized) Decode(d *jx.Decoder) error

Decode decodes CreateVideoUnauthorized from json.

func (*CreateVideoUnauthorized) Encode

func (s *CreateVideoUnauthorized) Encode(e *jx.Encoder)

Encode encodes CreateVideoUnauthorized as json.

func (*CreateVideoUnauthorized) MarshalJSON

func (s *CreateVideoUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateVideoUnauthorized) UnmarshalJSON

func (s *CreateVideoUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateWebhookBadRequest

type CreateWebhookBadRequest Error

func (*CreateWebhookBadRequest) Decode

func (s *CreateWebhookBadRequest) Decode(d *jx.Decoder) error

Decode decodes CreateWebhookBadRequest from json.

func (*CreateWebhookBadRequest) Encode

func (s *CreateWebhookBadRequest) Encode(e *jx.Encoder)

Encode encodes CreateWebhookBadRequest as json.

func (*CreateWebhookBadRequest) MarshalJSON

func (s *CreateWebhookBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateWebhookBadRequest) UnmarshalJSON

func (s *CreateWebhookBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateWebhookRequest

type CreateWebhookRequest struct {
	URL    url.URL                          `json:"url"`
	Events []CreateWebhookRequestEventsItem `json:"events"`
}

Ref: #/components/schemas/CreateWebhookRequest

func (*CreateWebhookRequest) Decode

func (s *CreateWebhookRequest) Decode(d *jx.Decoder) error

Decode decodes CreateWebhookRequest from json.

func (*CreateWebhookRequest) Encode

func (s *CreateWebhookRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateWebhookRequest) GetEvents

GetEvents returns the value of Events.

func (*CreateWebhookRequest) GetURL

func (s *CreateWebhookRequest) GetURL() url.URL

GetURL returns the value of URL.

func (*CreateWebhookRequest) MarshalJSON

func (s *CreateWebhookRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateWebhookRequest) SetEvents

SetEvents sets the value of Events.

func (*CreateWebhookRequest) SetURL

func (s *CreateWebhookRequest) SetURL(val url.URL)

SetURL sets the value of URL.

func (*CreateWebhookRequest) UnmarshalJSON

func (s *CreateWebhookRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateWebhookRequest) Validate

func (s *CreateWebhookRequest) Validate() error

type CreateWebhookRequestEventsItem

type CreateWebhookRequestEventsItem string
const (
	CreateWebhookRequestEventsItemAgentReady  CreateWebhookRequestEventsItem = "agent.ready"
	CreateWebhookRequestEventsItemAgentFailed CreateWebhookRequestEventsItem = "agent.failed"
)

func (CreateWebhookRequestEventsItem) AllValues

AllValues returns all CreateWebhookRequestEventsItem values.

func (*CreateWebhookRequestEventsItem) Decode

Decode decodes CreateWebhookRequestEventsItem from json.

func (CreateWebhookRequestEventsItem) Encode

Encode encodes CreateWebhookRequestEventsItem as json.

func (CreateWebhookRequestEventsItem) MarshalJSON

func (s CreateWebhookRequestEventsItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (CreateWebhookRequestEventsItem) MarshalText

func (s CreateWebhookRequestEventsItem) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*CreateWebhookRequestEventsItem) UnmarshalJSON

func (s *CreateWebhookRequestEventsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateWebhookRequestEventsItem) UnmarshalText

func (s *CreateWebhookRequestEventsItem) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (CreateWebhookRequestEventsItem) Validate

type CreateWebhookRes

type CreateWebhookRes interface {
	// contains filtered or unexported methods
}

type CreateWebhookUnauthorized

type CreateWebhookUnauthorized Error

func (*CreateWebhookUnauthorized) Decode

func (s *CreateWebhookUnauthorized) Decode(d *jx.Decoder) error

Decode decodes CreateWebhookUnauthorized from json.

func (*CreateWebhookUnauthorized) Encode

func (s *CreateWebhookUnauthorized) Encode(e *jx.Encoder)

Encode encodes CreateWebhookUnauthorized as json.

func (*CreateWebhookUnauthorized) MarshalJSON

func (s *CreateWebhookUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateWebhookUnauthorized) UnmarshalJSON

func (s *CreateWebhookUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteAgentNoContent

type DeleteAgentNoContent struct{}

DeleteAgentNoContent is response for DeleteAgent operation.

type DeleteAgentNotFound

type DeleteAgentNotFound Error

func (*DeleteAgentNotFound) Decode

func (s *DeleteAgentNotFound) Decode(d *jx.Decoder) error

Decode decodes DeleteAgentNotFound from json.

func (*DeleteAgentNotFound) Encode

func (s *DeleteAgentNotFound) Encode(e *jx.Encoder)

Encode encodes DeleteAgentNotFound as json.

func (*DeleteAgentNotFound) MarshalJSON

func (s *DeleteAgentNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteAgentNotFound) UnmarshalJSON

func (s *DeleteAgentNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteAgentParams

type DeleteAgentParams struct {
	// Agent ID.
	AgentId string
}

DeleteAgentParams is parameters of deleteAgent operation.

type DeleteAgentRes

type DeleteAgentRes interface {
	// contains filtered or unexported methods
}

type DeleteAgentUnauthorized

type DeleteAgentUnauthorized Error

func (*DeleteAgentUnauthorized) Decode

func (s *DeleteAgentUnauthorized) Decode(d *jx.Decoder) error

Decode decodes DeleteAgentUnauthorized from json.

func (*DeleteAgentUnauthorized) Encode

func (s *DeleteAgentUnauthorized) Encode(e *jx.Encoder)

Encode encodes DeleteAgentUnauthorized as json.

func (*DeleteAgentUnauthorized) MarshalJSON

func (s *DeleteAgentUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteAgentUnauthorized) UnmarshalJSON

func (s *DeleteAgentUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteWebhookNoContent

type DeleteWebhookNoContent struct{}

DeleteWebhookNoContent is response for DeleteWebhook operation.

type DeleteWebhookNotFound

type DeleteWebhookNotFound Error

func (*DeleteWebhookNotFound) Decode

func (s *DeleteWebhookNotFound) Decode(d *jx.Decoder) error

Decode decodes DeleteWebhookNotFound from json.

func (*DeleteWebhookNotFound) Encode

func (s *DeleteWebhookNotFound) Encode(e *jx.Encoder)

Encode encodes DeleteWebhookNotFound as json.

func (*DeleteWebhookNotFound) MarshalJSON

func (s *DeleteWebhookNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteWebhookNotFound) UnmarshalJSON

func (s *DeleteWebhookNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteWebhookParams

type DeleteWebhookParams struct {
	// Webhook ID.
	WebhookId string
}

DeleteWebhookParams is parameters of deleteWebhook operation.

type DeleteWebhookRes

type DeleteWebhookRes interface {
	// contains filtered or unexported methods
}

type DeleteWebhookUnauthorized

type DeleteWebhookUnauthorized Error

func (*DeleteWebhookUnauthorized) Decode

func (s *DeleteWebhookUnauthorized) Decode(d *jx.Decoder) error

Decode decodes DeleteWebhookUnauthorized from json.

func (*DeleteWebhookUnauthorized) Encode

func (s *DeleteWebhookUnauthorized) Encode(e *jx.Encoder)

Encode encodes DeleteWebhookUnauthorized as json.

func (*DeleteWebhookUnauthorized) MarshalJSON

func (s *DeleteWebhookUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteWebhookUnauthorized) UnmarshalJSON

func (s *DeleteWebhookUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EmbedToken

type EmbedToken struct {
	Token     OptString   `json:"token"`
	ExpiresAt OptDateTime `json:"expires_at"`
}

Ref: #/components/schemas/EmbedToken

func (*EmbedToken) Decode

func (s *EmbedToken) Decode(d *jx.Decoder) error

Decode decodes EmbedToken from json.

func (*EmbedToken) Encode

func (s *EmbedToken) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EmbedToken) GetExpiresAt

func (s *EmbedToken) GetExpiresAt() OptDateTime

GetExpiresAt returns the value of ExpiresAt.

func (*EmbedToken) GetToken

func (s *EmbedToken) GetToken() OptString

GetToken returns the value of Token.

func (*EmbedToken) MarshalJSON

func (s *EmbedToken) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EmbedToken) SetExpiresAt

func (s *EmbedToken) SetExpiresAt(val OptDateTime)

SetExpiresAt sets the value of ExpiresAt.

func (*EmbedToken) SetToken

func (s *EmbedToken) SetToken(val OptString)

SetToken sets the value of Token.

func (*EmbedToken) UnmarshalJSON

func (s *EmbedToken) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EndSessionNoContent

type EndSessionNoContent struct{}

EndSessionNoContent is response for EndSession operation.

type EndSessionNotFound

type EndSessionNotFound Error

func (*EndSessionNotFound) Decode

func (s *EndSessionNotFound) Decode(d *jx.Decoder) error

Decode decodes EndSessionNotFound from json.

func (*EndSessionNotFound) Encode

func (s *EndSessionNotFound) Encode(e *jx.Encoder)

Encode encodes EndSessionNotFound as json.

func (*EndSessionNotFound) MarshalJSON

func (s *EndSessionNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EndSessionNotFound) UnmarshalJSON

func (s *EndSessionNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EndSessionParams

type EndSessionParams struct {
	// Session ID.
	SessionId string
}

EndSessionParams is parameters of endSession operation.

type EndSessionRes

type EndSessionRes interface {
	// contains filtered or unexported methods
}

type EndSessionUnauthorized

type EndSessionUnauthorized Error

func (*EndSessionUnauthorized) Decode

func (s *EndSessionUnauthorized) Decode(d *jx.Decoder) error

Decode decodes EndSessionUnauthorized from json.

func (*EndSessionUnauthorized) Encode

func (s *EndSessionUnauthorized) Encode(e *jx.Encoder)

Encode encodes EndSessionUnauthorized as json.

func (*EndSessionUnauthorized) MarshalJSON

func (s *EndSessionUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EndSessionUnauthorized) UnmarshalJSON

func (s *EndSessionUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Error

type Error struct {
	// Error code.
	Error string `json:"error"`
	// Human-readable error message.
	Message string `json:"message"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetError

func (s *Error) GetError() string

GetError returns the value of Error.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetError

func (s *Error) SetError(val string)

SetError sets the value of Error.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type File

type File struct {
	ID          OptString   `json:"id"`
	URL         OptURI      `json:"url"`
	ContentType OptString   `json:"content_type"`
	SizeBytes   OptInt      `json:"size_bytes"`
	CreatedAt   OptDateTime `json:"created_at"`
}

Ref: #/components/schemas/File

func (*File) Decode

func (s *File) Decode(d *jx.Decoder) error

Decode decodes File from json.

func (*File) Encode

func (s *File) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*File) GetContentType

func (s *File) GetContentType() OptString

GetContentType returns the value of ContentType.

func (*File) GetCreatedAt

func (s *File) GetCreatedAt() OptDateTime

GetCreatedAt returns the value of CreatedAt.

func (*File) GetID

func (s *File) GetID() OptString

GetID returns the value of ID.

func (*File) GetSizeBytes

func (s *File) GetSizeBytes() OptInt

GetSizeBytes returns the value of SizeBytes.

func (*File) GetURL

func (s *File) GetURL() OptURI

GetURL returns the value of URL.

func (*File) MarshalJSON

func (s *File) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*File) SetContentType

func (s *File) SetContentType(val OptString)

SetContentType sets the value of ContentType.

func (*File) SetCreatedAt

func (s *File) SetCreatedAt(val OptDateTime)

SetCreatedAt sets the value of CreatedAt.

func (*File) SetID

func (s *File) SetID(val OptString)

SetID sets the value of ID.

func (*File) SetSizeBytes

func (s *File) SetSizeBytes(val OptInt)

SetSizeBytes sets the value of SizeBytes.

func (*File) SetURL

func (s *File) SetURL(val OptURI)

SetURL sets the value of URL.

func (*File) UnmarshalJSON

func (s *File) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAgentNotFound

type GetAgentNotFound Error

func (*GetAgentNotFound) Decode

func (s *GetAgentNotFound) Decode(d *jx.Decoder) error

Decode decodes GetAgentNotFound from json.

func (*GetAgentNotFound) Encode

func (s *GetAgentNotFound) Encode(e *jx.Encoder)

Encode encodes GetAgentNotFound as json.

func (*GetAgentNotFound) MarshalJSON

func (s *GetAgentNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAgentNotFound) UnmarshalJSON

func (s *GetAgentNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAgentParams

type GetAgentParams struct {
	// Agent ID.
	AgentId string
}

GetAgentParams is parameters of getAgent operation.

type GetAgentRes

type GetAgentRes interface {
	// contains filtered or unexported methods
}

type GetAgentUnauthorized

type GetAgentUnauthorized Error

func (*GetAgentUnauthorized) Decode

func (s *GetAgentUnauthorized) Decode(d *jx.Decoder) error

Decode decodes GetAgentUnauthorized from json.

func (*GetAgentUnauthorized) Encode

func (s *GetAgentUnauthorized) Encode(e *jx.Encoder)

Encode encodes GetAgentUnauthorized as json.

func (*GetAgentUnauthorized) MarshalJSON

func (s *GetAgentUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAgentUnauthorized) UnmarshalJSON

func (s *GetAgentUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetBalanceRes

type GetBalanceRes interface {
	// contains filtered or unexported methods
}

type GetSessionNotFound

type GetSessionNotFound Error

func (*GetSessionNotFound) Decode

func (s *GetSessionNotFound) Decode(d *jx.Decoder) error

Decode decodes GetSessionNotFound from json.

func (*GetSessionNotFound) Encode

func (s *GetSessionNotFound) Encode(e *jx.Encoder)

Encode encodes GetSessionNotFound as json.

func (*GetSessionNotFound) MarshalJSON

func (s *GetSessionNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetSessionNotFound) UnmarshalJSON

func (s *GetSessionNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetSessionParams

type GetSessionParams struct {
	// Session ID.
	SessionId string
}

GetSessionParams is parameters of getSession operation.

type GetSessionRes

type GetSessionRes interface {
	// contains filtered or unexported methods
}

type GetSessionUnauthorized

type GetSessionUnauthorized Error

func (*GetSessionUnauthorized) Decode

func (s *GetSessionUnauthorized) Decode(d *jx.Decoder) error

Decode decodes GetSessionUnauthorized from json.

func (*GetSessionUnauthorized) Encode

func (s *GetSessionUnauthorized) Encode(e *jx.Encoder)

Encode encodes GetSessionUnauthorized as json.

func (*GetSessionUnauthorized) MarshalJSON

func (s *GetSessionUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetSessionUnauthorized) UnmarshalJSON

func (s *GetSessionUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetVideoNotFound

type GetVideoNotFound Error

func (*GetVideoNotFound) Decode

func (s *GetVideoNotFound) Decode(d *jx.Decoder) error

Decode decodes GetVideoNotFound from json.

func (*GetVideoNotFound) Encode

func (s *GetVideoNotFound) Encode(e *jx.Encoder)

Encode encodes GetVideoNotFound as json.

func (*GetVideoNotFound) MarshalJSON

func (s *GetVideoNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetVideoNotFound) UnmarshalJSON

func (s *GetVideoNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetVideoParams

type GetVideoParams struct {
	// Video job ID.
	VideoId string
}

GetVideoParams is parameters of getVideo operation.

type GetVideoRes

type GetVideoRes interface {
	// contains filtered or unexported methods
}

type GetVideoUnauthorized

type GetVideoUnauthorized Error

func (*GetVideoUnauthorized) Decode

func (s *GetVideoUnauthorized) Decode(d *jx.Decoder) error

Decode decodes GetVideoUnauthorized from json.

func (*GetVideoUnauthorized) Encode

func (s *GetVideoUnauthorized) Encode(e *jx.Encoder)

Encode encodes GetVideoUnauthorized as json.

func (*GetVideoUnauthorized) MarshalJSON

func (s *GetVideoUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetVideoUnauthorized) UnmarshalJSON

func (s *GetVideoUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Handler

type Handler interface {
	// CreateAgent implements createAgent operation.
	//
	// Generate a new avatar agent from a text prompt with optional image/audio.
	// Returns immediately with agent ID; use GET /v1/agents/{id} to poll status.
	//
	// POST /v1/agents
	CreateAgent(ctx context.Context, req *CreateAgentRequest) (CreateAgentRes, error)
	// CreateEmbedToken implements createEmbedToken operation.
	//
	// Mint a short-lived JWT for embedding avatar in websites.
	//
	// POST /v1/embed/token
	CreateEmbedToken(ctx context.Context, req *CreateEmbedTokenRequest) (CreateEmbedTokenRes, error)
	// CreateSession implements createSession operation.
	//
	// Create a new real-time conversation session with an agent.
	// Returns connection details for WebRTC/LiveKit.
	//
	// POST /v1/sessions
	CreateSession(ctx context.Context, req *CreateSessionRequest) (CreateSessionRes, error)
	// CreateVideo implements createVideo operation.
	//
	// Generate an MP4 talking video from text or audio.
	// This is an async operation; poll GET /v1/videos/{id} for status.
	//
	// POST /v1/videos
	CreateVideo(ctx context.Context, req *CreateVideoRequest) (CreateVideoRes, error)
	// CreateWebhook implements createWebhook operation.
	//
	// Create webhook.
	//
	// POST /v1/webhooks
	CreateWebhook(ctx context.Context, req *CreateWebhookRequest) (CreateWebhookRes, error)
	// DeleteAgent implements deleteAgent operation.
	//
	// Delete agent.
	//
	// DELETE /v1/agents/{agentId}
	DeleteAgent(ctx context.Context, params DeleteAgentParams) (DeleteAgentRes, error)
	// DeleteWebhook implements deleteWebhook operation.
	//
	// Delete webhook.
	//
	// DELETE /v1/webhooks/{webhookId}
	DeleteWebhook(ctx context.Context, params DeleteWebhookParams) (DeleteWebhookRes, error)
	// EndSession implements endSession operation.
	//
	// End a session.
	//
	// DELETE /v1/sessions/{sessionId}
	EndSession(ctx context.Context, params EndSessionParams) (EndSessionRes, error)
	// GetAgent implements getAgent operation.
	//
	// Get agent details.
	//
	// GET /v1/agents/{agentId}
	GetAgent(ctx context.Context, params GetAgentParams) (GetAgentRes, error)
	// GetBalance implements getBalance operation.
	//
	// Get account balance.
	//
	// GET /v1/billing/balance
	GetBalance(ctx context.Context) (GetBalanceRes, error)
	// GetSession implements getSession operation.
	//
	// Get session details.
	//
	// GET /v1/sessions/{sessionId}
	GetSession(ctx context.Context, params GetSessionParams) (GetSessionRes, error)
	// GetVideo implements getVideo operation.
	//
	// Get video job status.
	//
	// GET /v1/videos/{videoId}
	GetVideo(ctx context.Context, params GetVideoParams) (GetVideoRes, error)
	// ListAgents implements listAgents operation.
	//
	// List all agents.
	//
	// GET /v1/agents
	ListAgents(ctx context.Context, params ListAgentsParams) (ListAgentsRes, error)
	// ListVoices implements listVoices operation.
	//
	// List available voices.
	//
	// GET /v1/voices
	ListVoices(ctx context.Context) (ListVoicesRes, error)
	// ListWebhooks implements listWebhooks operation.
	//
	// List webhooks.
	//
	// GET /v1/webhooks
	ListWebhooks(ctx context.Context) (ListWebhooksRes, error)
	// Speak implements speak operation.
	//
	// Send text for the agent to speak with lip-sync.
	//
	// POST /v1/agents/{agentId}/speak
	Speak(ctx context.Context, req *SpeakRequest, params SpeakParams) (SpeakRes, error)
	// TextToSpeech implements textToSpeech operation.
	//
	// Convert text to audio using bitHuman TTS.
	//
	// POST /v1/tts
	TextToSpeech(ctx context.Context, req *TTSRequest) (TextToSpeechRes, error)
	// UpdateAgent implements updateAgent operation.
	//
	// Update agent.
	//
	// PATCH /v1/agents/{agentId}
	UpdateAgent(ctx context.Context, req *UpdateAgentRequest, params UpdateAgentParams) (UpdateAgentRes, error)
	// UploadFile implements uploadFile operation.
	//
	// Upload images, video, audio, or documents.
	//
	// POST /v1/files
	UploadFile(ctx context.Context, req *UploadFileRequest) (UploadFileRes, error)
	// Validate implements validate operation.
	//
	// Cheapest way to verify API key is valid.
	//
	// POST /v1/validate
	Validate(ctx context.Context) (ValidateRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// CreateAgent invokes createAgent operation.
	//
	// Generate a new avatar agent from a text prompt with optional image/audio.
	// Returns immediately with agent ID; use GET /v1/agents/{id} to poll status.
	//
	// POST /v1/agents
	CreateAgent(ctx context.Context, request *CreateAgentRequest) (CreateAgentRes, error)
	// CreateEmbedToken invokes createEmbedToken operation.
	//
	// Mint a short-lived JWT for embedding avatar in websites.
	//
	// POST /v1/embed/token
	CreateEmbedToken(ctx context.Context, request *CreateEmbedTokenRequest) (CreateEmbedTokenRes, error)
	// CreateSession invokes createSession operation.
	//
	// Create a new real-time conversation session with an agent.
	// Returns connection details for WebRTC/LiveKit.
	//
	// POST /v1/sessions
	CreateSession(ctx context.Context, request *CreateSessionRequest) (CreateSessionRes, error)
	// CreateVideo invokes createVideo operation.
	//
	// Generate an MP4 talking video from text or audio.
	// This is an async operation; poll GET /v1/videos/{id} for status.
	//
	// POST /v1/videos
	CreateVideo(ctx context.Context, request *CreateVideoRequest) (CreateVideoRes, error)
	// CreateWebhook invokes createWebhook operation.
	//
	// Create webhook.
	//
	// POST /v1/webhooks
	CreateWebhook(ctx context.Context, request *CreateWebhookRequest) (CreateWebhookRes, error)
	// DeleteAgent invokes deleteAgent operation.
	//
	// Delete agent.
	//
	// DELETE /v1/agents/{agentId}
	DeleteAgent(ctx context.Context, params DeleteAgentParams) (DeleteAgentRes, error)
	// DeleteWebhook invokes deleteWebhook operation.
	//
	// Delete webhook.
	//
	// DELETE /v1/webhooks/{webhookId}
	DeleteWebhook(ctx context.Context, params DeleteWebhookParams) (DeleteWebhookRes, error)
	// EndSession invokes endSession operation.
	//
	// End a session.
	//
	// DELETE /v1/sessions/{sessionId}
	EndSession(ctx context.Context, params EndSessionParams) (EndSessionRes, error)
	// GetAgent invokes getAgent operation.
	//
	// Get agent details.
	//
	// GET /v1/agents/{agentId}
	GetAgent(ctx context.Context, params GetAgentParams) (GetAgentRes, error)
	// GetBalance invokes getBalance operation.
	//
	// Get account balance.
	//
	// GET /v1/billing/balance
	GetBalance(ctx context.Context) (GetBalanceRes, error)
	// GetSession invokes getSession operation.
	//
	// Get session details.
	//
	// GET /v1/sessions/{sessionId}
	GetSession(ctx context.Context, params GetSessionParams) (GetSessionRes, error)
	// GetVideo invokes getVideo operation.
	//
	// Get video job status.
	//
	// GET /v1/videos/{videoId}
	GetVideo(ctx context.Context, params GetVideoParams) (GetVideoRes, error)
	// ListAgents invokes listAgents operation.
	//
	// List all agents.
	//
	// GET /v1/agents
	ListAgents(ctx context.Context, params ListAgentsParams) (ListAgentsRes, error)
	// ListVoices invokes listVoices operation.
	//
	// List available voices.
	//
	// GET /v1/voices
	ListVoices(ctx context.Context) (ListVoicesRes, error)
	// ListWebhooks invokes listWebhooks operation.
	//
	// List webhooks.
	//
	// GET /v1/webhooks
	ListWebhooks(ctx context.Context) (ListWebhooksRes, error)
	// Speak invokes speak operation.
	//
	// Send text for the agent to speak with lip-sync.
	//
	// POST /v1/agents/{agentId}/speak
	Speak(ctx context.Context, request *SpeakRequest, params SpeakParams) (SpeakRes, error)
	// TextToSpeech invokes textToSpeech operation.
	//
	// Convert text to audio using bitHuman TTS.
	//
	// POST /v1/tts
	TextToSpeech(ctx context.Context, request *TTSRequest) (TextToSpeechRes, error)
	// UpdateAgent invokes updateAgent operation.
	//
	// Update agent.
	//
	// PATCH /v1/agents/{agentId}
	UpdateAgent(ctx context.Context, request *UpdateAgentRequest, params UpdateAgentParams) (UpdateAgentRes, error)
	// UploadFile invokes uploadFile operation.
	//
	// Upload images, video, audio, or documents.
	//
	// POST /v1/files
	UploadFile(ctx context.Context, request *UploadFileRequest) (UploadFileRes, error)
	// Validate invokes validate operation.
	//
	// Cheapest way to verify API key is valid.
	//
	// POST /v1/validate
	Validate(ctx context.Context) (ValidateRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

type Labeler struct {
	// contains filtered or unexported fields
}

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type ListAgentsParams

type ListAgentsParams struct {
	// Maximum number of items to return.
	Limit OptInt `json:",omitempty,omitzero"`
	// Number of items to skip.
	Offset OptInt `json:",omitempty,omitzero"`
}

ListAgentsParams is parameters of listAgents operation.

type ListAgentsRes

type ListAgentsRes interface {
	// contains filtered or unexported methods
}

type ListVoicesRes

type ListVoicesRes interface {
	// contains filtered or unexported methods
}

type ListWebhooksRes

type ListWebhooksRes interface {
	// contains filtered or unexported methods
}

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	CreateAgentOperation      OperationName = "CreateAgent"
	CreateEmbedTokenOperation OperationName = "CreateEmbedToken"
	CreateSessionOperation    OperationName = "CreateSession"
	CreateVideoOperation      OperationName = "CreateVideo"
	CreateWebhookOperation    OperationName = "CreateWebhook"
	DeleteAgentOperation      OperationName = "DeleteAgent"
	DeleteWebhookOperation    OperationName = "DeleteWebhook"
	EndSessionOperation       OperationName = "EndSession"
	GetAgentOperation         OperationName = "GetAgent"
	GetBalanceOperation       OperationName = "GetBalance"
	GetSessionOperation       OperationName = "GetSession"
	GetVideoOperation         OperationName = "GetVideo"
	ListAgentsOperation       OperationName = "ListAgents"
	ListVoicesOperation       OperationName = "ListVoices"
	ListWebhooksOperation     OperationName = "ListWebhooks"
	SpeakOperation            OperationName = "Speak"
	TextToSpeechOperation     OperationName = "TextToSpeech"
	UpdateAgentOperation      OperationName = "UpdateAgent"
	UploadFileOperation       OperationName = "UploadFile"
	ValidateOperation         OperationName = "Validate"
)

type OptAgentModelType

type OptAgentModelType struct {
	Value AgentModelType
	Set   bool
}

OptAgentModelType is optional AgentModelType.

func NewOptAgentModelType

func NewOptAgentModelType(v AgentModelType) OptAgentModelType

NewOptAgentModelType returns new OptAgentModelType with value set to v.

func (*OptAgentModelType) Decode

func (o *OptAgentModelType) Decode(d *jx.Decoder) error

Decode decodes AgentModelType from json.

func (OptAgentModelType) Encode

func (o OptAgentModelType) Encode(e *jx.Encoder)

Encode encodes AgentModelType as json.

func (OptAgentModelType) Get

func (o OptAgentModelType) Get() (v AgentModelType, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptAgentModelType) IsSet

func (o OptAgentModelType) IsSet() bool

IsSet returns true if OptAgentModelType was set.

func (OptAgentModelType) MarshalJSON

func (s OptAgentModelType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptAgentModelType) Or

Or returns value if set, or given parameter if does not.

func (*OptAgentModelType) Reset

func (o *OptAgentModelType) Reset()

Reset unsets value.

func (*OptAgentModelType) SetTo

func (o *OptAgentModelType) SetTo(v AgentModelType)

SetTo sets value to v.

func (*OptAgentModelType) UnmarshalJSON

func (s *OptAgentModelType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptBalanceMinutesEstimate

type OptBalanceMinutesEstimate struct {
	Value BalanceMinutesEstimate
	Set   bool
}

OptBalanceMinutesEstimate is optional BalanceMinutesEstimate.

func NewOptBalanceMinutesEstimate

func NewOptBalanceMinutesEstimate(v BalanceMinutesEstimate) OptBalanceMinutesEstimate

NewOptBalanceMinutesEstimate returns new OptBalanceMinutesEstimate with value set to v.

func (*OptBalanceMinutesEstimate) Decode

func (o *OptBalanceMinutesEstimate) Decode(d *jx.Decoder) error

Decode decodes BalanceMinutesEstimate from json.

func (OptBalanceMinutesEstimate) Encode

func (o OptBalanceMinutesEstimate) Encode(e *jx.Encoder)

Encode encodes BalanceMinutesEstimate as json.

func (OptBalanceMinutesEstimate) Get

Get returns value and boolean that denotes whether value was set.

func (OptBalanceMinutesEstimate) IsSet

func (o OptBalanceMinutesEstimate) IsSet() bool

IsSet returns true if OptBalanceMinutesEstimate was set.

func (OptBalanceMinutesEstimate) MarshalJSON

func (s OptBalanceMinutesEstimate) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBalanceMinutesEstimate) Or

Or returns value if set, or given parameter if does not.

func (*OptBalanceMinutesEstimate) Reset

func (o *OptBalanceMinutesEstimate) Reset()

Reset unsets value.

func (*OptBalanceMinutesEstimate) SetTo

SetTo sets value to v.

func (*OptBalanceMinutesEstimate) UnmarshalJSON

func (s *OptBalanceMinutesEstimate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateAgentRequestModelType

type OptCreateAgentRequestModelType struct {
	Value CreateAgentRequestModelType
	Set   bool
}

OptCreateAgentRequestModelType is optional CreateAgentRequestModelType.

func NewOptCreateAgentRequestModelType

func NewOptCreateAgentRequestModelType(v CreateAgentRequestModelType) OptCreateAgentRequestModelType

NewOptCreateAgentRequestModelType returns new OptCreateAgentRequestModelType with value set to v.

func (*OptCreateAgentRequestModelType) Decode

Decode decodes CreateAgentRequestModelType from json.

func (OptCreateAgentRequestModelType) Encode

Encode encodes CreateAgentRequestModelType as json.

func (OptCreateAgentRequestModelType) Get

Get returns value and boolean that denotes whether value was set.

func (OptCreateAgentRequestModelType) IsSet

IsSet returns true if OptCreateAgentRequestModelType was set.

func (OptCreateAgentRequestModelType) MarshalJSON

func (s OptCreateAgentRequestModelType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateAgentRequestModelType) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateAgentRequestModelType) Reset

func (o *OptCreateAgentRequestModelType) Reset()

Reset unsets value.

func (*OptCreateAgentRequestModelType) SetTo

SetTo sets value to v.

func (*OptCreateAgentRequestModelType) UnmarshalJSON

func (s *OptCreateAgentRequestModelType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDateTime) Get

func (o OptDateTime) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDateTime) IsSet

func (o OptDateTime) IsSet() bool

IsSet returns true if OptDateTime was set.

func (OptDateTime) MarshalJSON

func (s OptDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDateTime) Or

func (o OptDateTime) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDateTime) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

OptFloat64 is optional float64.

func NewOptFloat64

func NewOptFloat64(v float64) OptFloat64

NewOptFloat64 returns new OptFloat64 with value set to v.

func (*OptFloat64) Decode

func (o *OptFloat64) Decode(d *jx.Decoder) error

Decode decodes float64 from json.

func (OptFloat64) Encode

func (o OptFloat64) Encode(e *jx.Encoder)

Encode encodes float64 as json.

func (OptFloat64) Get

func (o OptFloat64) Get() (v float64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFloat64) IsSet

func (o OptFloat64) IsSet() bool

IsSet returns true if OptFloat64 was set.

func (OptFloat64) MarshalJSON

func (s OptFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFloat64) Or

func (o OptFloat64) Or(d float64) float64

Or returns value if set, or given parameter if does not.

func (*OptFloat64) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptURI

type OptURI struct {
	Value url.URL
	Set   bool
}

OptURI is optional url.URL.

func NewOptURI

func NewOptURI(v url.URL) OptURI

NewOptURI returns new OptURI with value set to v.

func (*OptURI) Decode

func (o *OptURI) Decode(d *jx.Decoder) error

Decode decodes url.URL from json.

func (OptURI) Encode

func (o OptURI) Encode(e *jx.Encoder)

Encode encodes url.URL as json.

func (OptURI) Get

func (o OptURI) Get() (v url.URL, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptURI) IsSet

func (o OptURI) IsSet() bool

IsSet returns true if OptURI was set.

func (OptURI) MarshalJSON

func (s OptURI) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptURI) Or

func (o OptURI) Or(d url.URL) url.URL

Or returns value if set, or given parameter if does not.

func (*OptURI) Reset

func (o *OptURI) Reset()

Reset unsets value.

func (*OptURI) SetTo

func (o *OptURI) SetTo(v url.URL)

SetTo sets value to v.

func (*OptURI) UnmarshalJSON

func (s *OptURI) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVoiceGender

type OptVoiceGender struct {
	Value VoiceGender
	Set   bool
}

OptVoiceGender is optional VoiceGender.

func NewOptVoiceGender

func NewOptVoiceGender(v VoiceGender) OptVoiceGender

NewOptVoiceGender returns new OptVoiceGender with value set to v.

func (*OptVoiceGender) Decode

func (o *OptVoiceGender) Decode(d *jx.Decoder) error

Decode decodes VoiceGender from json.

func (OptVoiceGender) Encode

func (o OptVoiceGender) Encode(e *jx.Encoder)

Encode encodes VoiceGender as json.

func (OptVoiceGender) Get

func (o OptVoiceGender) Get() (v VoiceGender, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVoiceGender) IsSet

func (o OptVoiceGender) IsSet() bool

IsSet returns true if OptVoiceGender was set.

func (OptVoiceGender) MarshalJSON

func (s OptVoiceGender) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVoiceGender) Or

Or returns value if set, or given parameter if does not.

func (*OptVoiceGender) Reset

func (o *OptVoiceGender) Reset()

Reset unsets value.

func (*OptVoiceGender) SetTo

func (o *OptVoiceGender) SetTo(v VoiceGender)

SetTo sets value to v.

func (*OptVoiceGender) UnmarshalJSON

func (s *OptVoiceGender) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

WithAttributes specifies default otel attributes.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationGroup

func (r Route) OperationGroup() string

OperationGroup returns the x-ogen-operation-group value.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleApiSecret handles apiSecret security.
	// API secret key from Developer → API Keys.
	HandleApiSecret(ctx context.Context, operationName OperationName, t ApiSecret) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// ApiSecret provides apiSecret security value.
	// API secret key from Developer → API Keys.
	ApiSecret(ctx context.Context, operationName OperationName) (ApiSecret, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type Session

type Session struct {
	// Session ID.
	ID string `json:"id"`
	// Agent ID.
	AgentID string        `json:"agent_id"`
	Status  SessionStatus `json:"status"`
	// LiveKit WebSocket URL.
	LivekitURL OptString `json:"livekit_url"`
	// LiveKit JWT token.
	LivekitToken OptString   `json:"livekit_token"`
	CreatedAt    OptDateTime `json:"created_at"`
}

Ref: #/components/schemas/Session

func (*Session) Decode

func (s *Session) Decode(d *jx.Decoder) error

Decode decodes Session from json.

func (*Session) Encode

func (s *Session) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Session) GetAgentID

func (s *Session) GetAgentID() string

GetAgentID returns the value of AgentID.

func (*Session) GetCreatedAt

func (s *Session) GetCreatedAt() OptDateTime

GetCreatedAt returns the value of CreatedAt.

func (*Session) GetID

func (s *Session) GetID() string

GetID returns the value of ID.

func (*Session) GetLivekitToken

func (s *Session) GetLivekitToken() OptString

GetLivekitToken returns the value of LivekitToken.

func (*Session) GetLivekitURL

func (s *Session) GetLivekitURL() OptString

GetLivekitURL returns the value of LivekitURL.

func (*Session) GetStatus

func (s *Session) GetStatus() SessionStatus

GetStatus returns the value of Status.

func (*Session) MarshalJSON

func (s *Session) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Session) SetAgentID

func (s *Session) SetAgentID(val string)

SetAgentID sets the value of AgentID.

func (*Session) SetCreatedAt

func (s *Session) SetCreatedAt(val OptDateTime)

SetCreatedAt sets the value of CreatedAt.

func (*Session) SetID

func (s *Session) SetID(val string)

SetID sets the value of ID.

func (*Session) SetLivekitToken

func (s *Session) SetLivekitToken(val OptString)

SetLivekitToken sets the value of LivekitToken.

func (*Session) SetLivekitURL

func (s *Session) SetLivekitURL(val OptString)

SetLivekitURL sets the value of LivekitURL.

func (*Session) SetStatus

func (s *Session) SetStatus(val SessionStatus)

SetStatus sets the value of Status.

func (*Session) UnmarshalJSON

func (s *Session) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Session) Validate

func (s *Session) Validate() error

type SessionStatus

type SessionStatus string
const (
	SessionStatusActive SessionStatus = "active"
	SessionStatusEnded  SessionStatus = "ended"
)

func (SessionStatus) AllValues

func (SessionStatus) AllValues() []SessionStatus

AllValues returns all SessionStatus values.

func (*SessionStatus) Decode

func (s *SessionStatus) Decode(d *jx.Decoder) error

Decode decodes SessionStatus from json.

func (SessionStatus) Encode

func (s SessionStatus) Encode(e *jx.Encoder)

Encode encodes SessionStatus as json.

func (SessionStatus) MarshalJSON

func (s SessionStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (SessionStatus) MarshalText

func (s SessionStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*SessionStatus) UnmarshalJSON

func (s *SessionStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SessionStatus) UnmarshalText

func (s *SessionStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (SessionStatus) Validate

func (s SessionStatus) Validate() error

type SpeakNotFound

type SpeakNotFound Error

func (*SpeakNotFound) Decode

func (s *SpeakNotFound) Decode(d *jx.Decoder) error

Decode decodes SpeakNotFound from json.

func (*SpeakNotFound) Encode

func (s *SpeakNotFound) Encode(e *jx.Encoder)

Encode encodes SpeakNotFound as json.

func (*SpeakNotFound) MarshalJSON

func (s *SpeakNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SpeakNotFound) UnmarshalJSON

func (s *SpeakNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SpeakParams

type SpeakParams struct {
	// Agent ID.
	AgentId string
}

SpeakParams is parameters of speak operation.

type SpeakRequest

type SpeakRequest struct {
	// Text for the agent to speak.
	Text string `json:"text"`
	// Voice to use (optional).
	VoiceID OptString `json:"voice_id"`
}

Ref: #/components/schemas/SpeakRequest

func (*SpeakRequest) Decode

func (s *SpeakRequest) Decode(d *jx.Decoder) error

Decode decodes SpeakRequest from json.

func (*SpeakRequest) Encode

func (s *SpeakRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SpeakRequest) GetText

func (s *SpeakRequest) GetText() string

GetText returns the value of Text.

func (*SpeakRequest) GetVoiceID

func (s *SpeakRequest) GetVoiceID() OptString

GetVoiceID returns the value of VoiceID.

func (*SpeakRequest) MarshalJSON

func (s *SpeakRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SpeakRequest) SetText

func (s *SpeakRequest) SetText(val string)

SetText sets the value of Text.

func (*SpeakRequest) SetVoiceID

func (s *SpeakRequest) SetVoiceID(val OptString)

SetVoiceID sets the value of VoiceID.

func (*SpeakRequest) UnmarshalJSON

func (s *SpeakRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SpeakRes

type SpeakRes interface {
	// contains filtered or unexported methods
}

type SpeakResponse

type SpeakResponse struct {
	Success OptBool `json:"success"`
	// Estimated speech duration.
	DurationMs OptInt `json:"duration_ms"`
}

Ref: #/components/schemas/SpeakResponse

func (*SpeakResponse) Decode

func (s *SpeakResponse) Decode(d *jx.Decoder) error

Decode decodes SpeakResponse from json.

func (*SpeakResponse) Encode

func (s *SpeakResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SpeakResponse) GetDurationMs

func (s *SpeakResponse) GetDurationMs() OptInt

GetDurationMs returns the value of DurationMs.

func (*SpeakResponse) GetSuccess

func (s *SpeakResponse) GetSuccess() OptBool

GetSuccess returns the value of Success.

func (*SpeakResponse) MarshalJSON

func (s *SpeakResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SpeakResponse) SetDurationMs

func (s *SpeakResponse) SetDurationMs(val OptInt)

SetDurationMs sets the value of DurationMs.

func (*SpeakResponse) SetSuccess

func (s *SpeakResponse) SetSuccess(val OptBool)

SetSuccess sets the value of Success.

func (*SpeakResponse) UnmarshalJSON

func (s *SpeakResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SpeakUnauthorized

type SpeakUnauthorized Error

func (*SpeakUnauthorized) Decode

func (s *SpeakUnauthorized) Decode(d *jx.Decoder) error

Decode decodes SpeakUnauthorized from json.

func (*SpeakUnauthorized) Encode

func (s *SpeakUnauthorized) Encode(e *jx.Encoder)

Encode encodes SpeakUnauthorized as json.

func (*SpeakUnauthorized) MarshalJSON

func (s *SpeakUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SpeakUnauthorized) UnmarshalJSON

func (s *SpeakUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TTSRequest

type TTSRequest struct {
	// Text to synthesize.
	Text string `json:"text"`
	// Voice ID (M1-M5, F1-F5).
	VoiceID OptString `json:"voice_id"`
	// Language code (e.g., en, es, fr).
	Language OptString `json:"language"`
}

Ref: #/components/schemas/TTSRequest

func (*TTSRequest) Decode

func (s *TTSRequest) Decode(d *jx.Decoder) error

Decode decodes TTSRequest from json.

func (*TTSRequest) Encode

func (s *TTSRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TTSRequest) GetLanguage

func (s *TTSRequest) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*TTSRequest) GetText

func (s *TTSRequest) GetText() string

GetText returns the value of Text.

func (*TTSRequest) GetVoiceID

func (s *TTSRequest) GetVoiceID() OptString

GetVoiceID returns the value of VoiceID.

func (*TTSRequest) MarshalJSON

func (s *TTSRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TTSRequest) SetLanguage

func (s *TTSRequest) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*TTSRequest) SetText

func (s *TTSRequest) SetText(val string)

SetText sets the value of Text.

func (*TTSRequest) SetVoiceID

func (s *TTSRequest) SetVoiceID(val OptString)

SetVoiceID sets the value of VoiceID.

func (*TTSRequest) UnmarshalJSON

func (s *TTSRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TextToSpeechBadRequest

type TextToSpeechBadRequest Error

func (*TextToSpeechBadRequest) Decode

func (s *TextToSpeechBadRequest) Decode(d *jx.Decoder) error

Decode decodes TextToSpeechBadRequest from json.

func (*TextToSpeechBadRequest) Encode

func (s *TextToSpeechBadRequest) Encode(e *jx.Encoder)

Encode encodes TextToSpeechBadRequest as json.

func (*TextToSpeechBadRequest) MarshalJSON

func (s *TextToSpeechBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TextToSpeechBadRequest) UnmarshalJSON

func (s *TextToSpeechBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TextToSpeechOK

type TextToSpeechOK struct {
	Data io.Reader
}

func (TextToSpeechOK) Read

func (s TextToSpeechOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type TextToSpeechRes

type TextToSpeechRes interface {
	// contains filtered or unexported methods
}

type TextToSpeechUnauthorized

type TextToSpeechUnauthorized Error

func (*TextToSpeechUnauthorized) Decode

func (s *TextToSpeechUnauthorized) Decode(d *jx.Decoder) error

Decode decodes TextToSpeechUnauthorized from json.

func (*TextToSpeechUnauthorized) Encode

func (s *TextToSpeechUnauthorized) Encode(e *jx.Encoder)

Encode encodes TextToSpeechUnauthorized as json.

func (*TextToSpeechUnauthorized) MarshalJSON

func (s *TextToSpeechUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TextToSpeechUnauthorized) UnmarshalJSON

func (s *TextToSpeechUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) CreateAgent

CreateAgent implements createAgent operation.

Generate a new avatar agent from a text prompt with optional image/audio. Returns immediately with agent ID; use GET /v1/agents/{id} to poll status.

POST /v1/agents

func (UnimplementedHandler) CreateEmbedToken

CreateEmbedToken implements createEmbedToken operation.

Mint a short-lived JWT for embedding avatar in websites.

POST /v1/embed/token

func (UnimplementedHandler) CreateSession

CreateSession implements createSession operation.

Create a new real-time conversation session with an agent. Returns connection details for WebRTC/LiveKit.

POST /v1/sessions

func (UnimplementedHandler) CreateVideo

CreateVideo implements createVideo operation.

Generate an MP4 talking video from text or audio. This is an async operation; poll GET /v1/videos/{id} for status.

POST /v1/videos

func (UnimplementedHandler) CreateWebhook

CreateWebhook implements createWebhook operation.

Create webhook.

POST /v1/webhooks

func (UnimplementedHandler) DeleteAgent

DeleteAgent implements deleteAgent operation.

Delete agent.

DELETE /v1/agents/{agentId}

func (UnimplementedHandler) DeleteWebhook

DeleteWebhook implements deleteWebhook operation.

Delete webhook.

DELETE /v1/webhooks/{webhookId}

func (UnimplementedHandler) EndSession

EndSession implements endSession operation.

End a session.

DELETE /v1/sessions/{sessionId}

func (UnimplementedHandler) GetAgent

func (UnimplementedHandler) GetAgent(ctx context.Context, params GetAgentParams) (r GetAgentRes, _ error)

GetAgent implements getAgent operation.

Get agent details.

GET /v1/agents/{agentId}

func (UnimplementedHandler) GetBalance

func (UnimplementedHandler) GetBalance(ctx context.Context) (r GetBalanceRes, _ error)

GetBalance implements getBalance operation.

Get account balance.

GET /v1/billing/balance

func (UnimplementedHandler) GetSession

GetSession implements getSession operation.

Get session details.

GET /v1/sessions/{sessionId}

func (UnimplementedHandler) GetVideo

func (UnimplementedHandler) GetVideo(ctx context.Context, params GetVideoParams) (r GetVideoRes, _ error)

GetVideo implements getVideo operation.

Get video job status.

GET /v1/videos/{videoId}

func (UnimplementedHandler) ListAgents

ListAgents implements listAgents operation.

List all agents.

GET /v1/agents

func (UnimplementedHandler) ListVoices

func (UnimplementedHandler) ListVoices(ctx context.Context) (r ListVoicesRes, _ error)

ListVoices implements listVoices operation.

List available voices.

GET /v1/voices

func (UnimplementedHandler) ListWebhooks

func (UnimplementedHandler) ListWebhooks(ctx context.Context) (r ListWebhooksRes, _ error)

ListWebhooks implements listWebhooks operation.

List webhooks.

GET /v1/webhooks

func (UnimplementedHandler) Speak

func (UnimplementedHandler) Speak(ctx context.Context, req *SpeakRequest, params SpeakParams) (r SpeakRes, _ error)

Speak implements speak operation.

Send text for the agent to speak with lip-sync.

POST /v1/agents/{agentId}/speak

func (UnimplementedHandler) TextToSpeech

func (UnimplementedHandler) TextToSpeech(ctx context.Context, req *TTSRequest) (r TextToSpeechRes, _ error)

TextToSpeech implements textToSpeech operation.

Convert text to audio using bitHuman TTS.

POST /v1/tts

func (UnimplementedHandler) UpdateAgent

UpdateAgent implements updateAgent operation.

Update agent.

PATCH /v1/agents/{agentId}

func (UnimplementedHandler) UploadFile

UploadFile implements uploadFile operation.

Upload images, video, audio, or documents.

POST /v1/files

func (UnimplementedHandler) Validate

func (UnimplementedHandler) Validate(ctx context.Context) (r ValidateRes, _ error)

Validate implements validate operation.

Cheapest way to verify API key is valid.

POST /v1/validate

type UpdateAgentNotFound

type UpdateAgentNotFound Error

func (*UpdateAgentNotFound) Decode

func (s *UpdateAgentNotFound) Decode(d *jx.Decoder) error

Decode decodes UpdateAgentNotFound from json.

func (*UpdateAgentNotFound) Encode

func (s *UpdateAgentNotFound) Encode(e *jx.Encoder)

Encode encodes UpdateAgentNotFound as json.

func (*UpdateAgentNotFound) MarshalJSON

func (s *UpdateAgentNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateAgentNotFound) UnmarshalJSON

func (s *UpdateAgentNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateAgentParams

type UpdateAgentParams struct {
	// Agent ID.
	AgentId string
}

UpdateAgentParams is parameters of updateAgent operation.

type UpdateAgentRequest

type UpdateAgentRequest struct {
	Name   OptString `json:"name"`
	Prompt OptString `json:"prompt"`
}

Ref: #/components/schemas/UpdateAgentRequest

func (*UpdateAgentRequest) Decode

func (s *UpdateAgentRequest) Decode(d *jx.Decoder) error

Decode decodes UpdateAgentRequest from json.

func (*UpdateAgentRequest) Encode

func (s *UpdateAgentRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateAgentRequest) GetName

func (s *UpdateAgentRequest) GetName() OptString

GetName returns the value of Name.

func (*UpdateAgentRequest) GetPrompt

func (s *UpdateAgentRequest) GetPrompt() OptString

GetPrompt returns the value of Prompt.

func (*UpdateAgentRequest) MarshalJSON

func (s *UpdateAgentRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateAgentRequest) SetName

func (s *UpdateAgentRequest) SetName(val OptString)

SetName sets the value of Name.

func (*UpdateAgentRequest) SetPrompt

func (s *UpdateAgentRequest) SetPrompt(val OptString)

SetPrompt sets the value of Prompt.

func (*UpdateAgentRequest) UnmarshalJSON

func (s *UpdateAgentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateAgentRes

type UpdateAgentRes interface {
	// contains filtered or unexported methods
}

type UpdateAgentUnauthorized

type UpdateAgentUnauthorized Error

func (*UpdateAgentUnauthorized) Decode

func (s *UpdateAgentUnauthorized) Decode(d *jx.Decoder) error

Decode decodes UpdateAgentUnauthorized from json.

func (*UpdateAgentUnauthorized) Encode

func (s *UpdateAgentUnauthorized) Encode(e *jx.Encoder)

Encode encodes UpdateAgentUnauthorized as json.

func (*UpdateAgentUnauthorized) MarshalJSON

func (s *UpdateAgentUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateAgentUnauthorized) UnmarshalJSON

func (s *UpdateAgentUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UploadFileBadRequest

type UploadFileBadRequest Error

func (*UploadFileBadRequest) Decode

func (s *UploadFileBadRequest) Decode(d *jx.Decoder) error

Decode decodes UploadFileBadRequest from json.

func (*UploadFileBadRequest) Encode

func (s *UploadFileBadRequest) Encode(e *jx.Encoder)

Encode encodes UploadFileBadRequest as json.

func (*UploadFileBadRequest) MarshalJSON

func (s *UploadFileBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UploadFileBadRequest) UnmarshalJSON

func (s *UploadFileBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UploadFileRequest

type UploadFileRequest struct {
	// URL to download file from.
	URL OptURI `json:"url"`
	// File content as base64.
	Base64 OptString `json:"base64"`
	// Original filename.
	Filename OptString `json:"filename"`
	// MIME type.
	ContentType OptString `json:"content_type"`
}

Ref: #/components/schemas/UploadFileRequest

func (*UploadFileRequest) Decode

func (s *UploadFileRequest) Decode(d *jx.Decoder) error

Decode decodes UploadFileRequest from json.

func (*UploadFileRequest) Encode

func (s *UploadFileRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UploadFileRequest) GetBase64

func (s *UploadFileRequest) GetBase64() OptString

GetBase64 returns the value of Base64.

func (*UploadFileRequest) GetContentType

func (s *UploadFileRequest) GetContentType() OptString

GetContentType returns the value of ContentType.

func (*UploadFileRequest) GetFilename

func (s *UploadFileRequest) GetFilename() OptString

GetFilename returns the value of Filename.

func (*UploadFileRequest) GetURL

func (s *UploadFileRequest) GetURL() OptURI

GetURL returns the value of URL.

func (*UploadFileRequest) MarshalJSON

func (s *UploadFileRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UploadFileRequest) SetBase64

func (s *UploadFileRequest) SetBase64(val OptString)

SetBase64 sets the value of Base64.

func (*UploadFileRequest) SetContentType

func (s *UploadFileRequest) SetContentType(val OptString)

SetContentType sets the value of ContentType.

func (*UploadFileRequest) SetFilename

func (s *UploadFileRequest) SetFilename(val OptString)

SetFilename sets the value of Filename.

func (*UploadFileRequest) SetURL

func (s *UploadFileRequest) SetURL(val OptURI)

SetURL sets the value of URL.

func (*UploadFileRequest) UnmarshalJSON

func (s *UploadFileRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UploadFileRes

type UploadFileRes interface {
	// contains filtered or unexported methods
}

type UploadFileUnauthorized

type UploadFileUnauthorized Error

func (*UploadFileUnauthorized) Decode

func (s *UploadFileUnauthorized) Decode(d *jx.Decoder) error

Decode decodes UploadFileUnauthorized from json.

func (*UploadFileUnauthorized) Encode

func (s *UploadFileUnauthorized) Encode(e *jx.Encoder)

Encode encodes UploadFileUnauthorized as json.

func (*UploadFileUnauthorized) MarshalJSON

func (s *UploadFileUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UploadFileUnauthorized) UnmarshalJSON

func (s *UploadFileUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ValidateRes

type ValidateRes interface {
	// contains filtered or unexported methods
}

type ValidateResponse

type ValidateResponse struct {
	Valid     OptBool   `json:"valid"`
	AccountID OptString `json:"account_id"`
}

Ref: #/components/schemas/ValidateResponse

func (*ValidateResponse) Decode

func (s *ValidateResponse) Decode(d *jx.Decoder) error

Decode decodes ValidateResponse from json.

func (*ValidateResponse) Encode

func (s *ValidateResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ValidateResponse) GetAccountID

func (s *ValidateResponse) GetAccountID() OptString

GetAccountID returns the value of AccountID.

func (*ValidateResponse) GetValid

func (s *ValidateResponse) GetValid() OptBool

GetValid returns the value of Valid.

func (*ValidateResponse) MarshalJSON

func (s *ValidateResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ValidateResponse) SetAccountID

func (s *ValidateResponse) SetAccountID(val OptString)

SetAccountID sets the value of AccountID.

func (*ValidateResponse) SetValid

func (s *ValidateResponse) SetValid(val OptBool)

SetValid sets the value of Valid.

func (*ValidateResponse) UnmarshalJSON

func (s *ValidateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type VideoJob

type VideoJob struct {
	ID      string         `json:"id"`
	AgentID OptString      `json:"agent_id"`
	Status  VideoJobStatus `json:"status"`
	// Download URL (when completed).
	VideoURL        OptURI     `json:"video_url"`
	DurationSeconds OptFloat64 `json:"duration_seconds"`
	// Error message (when failed).
	Error     OptString   `json:"error"`
	CreatedAt OptDateTime `json:"created_at"`
}

Ref: #/components/schemas/VideoJob

func (*VideoJob) Decode

func (s *VideoJob) Decode(d *jx.Decoder) error

Decode decodes VideoJob from json.

func (*VideoJob) Encode

func (s *VideoJob) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoJob) GetAgentID

func (s *VideoJob) GetAgentID() OptString

GetAgentID returns the value of AgentID.

func (*VideoJob) GetCreatedAt

func (s *VideoJob) GetCreatedAt() OptDateTime

GetCreatedAt returns the value of CreatedAt.

func (*VideoJob) GetDurationSeconds

func (s *VideoJob) GetDurationSeconds() OptFloat64

GetDurationSeconds returns the value of DurationSeconds.

func (*VideoJob) GetError

func (s *VideoJob) GetError() OptString

GetError returns the value of Error.

func (*VideoJob) GetID

func (s *VideoJob) GetID() string

GetID returns the value of ID.

func (*VideoJob) GetStatus

func (s *VideoJob) GetStatus() VideoJobStatus

GetStatus returns the value of Status.

func (*VideoJob) GetVideoURL

func (s *VideoJob) GetVideoURL() OptURI

GetVideoURL returns the value of VideoURL.

func (*VideoJob) MarshalJSON

func (s *VideoJob) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoJob) SetAgentID

func (s *VideoJob) SetAgentID(val OptString)

SetAgentID sets the value of AgentID.

func (*VideoJob) SetCreatedAt

func (s *VideoJob) SetCreatedAt(val OptDateTime)

SetCreatedAt sets the value of CreatedAt.

func (*VideoJob) SetDurationSeconds

func (s *VideoJob) SetDurationSeconds(val OptFloat64)

SetDurationSeconds sets the value of DurationSeconds.

func (*VideoJob) SetError

func (s *VideoJob) SetError(val OptString)

SetError sets the value of Error.

func (*VideoJob) SetID

func (s *VideoJob) SetID(val string)

SetID sets the value of ID.

func (*VideoJob) SetStatus

func (s *VideoJob) SetStatus(val VideoJobStatus)

SetStatus sets the value of Status.

func (*VideoJob) SetVideoURL

func (s *VideoJob) SetVideoURL(val OptURI)

SetVideoURL sets the value of VideoURL.

func (*VideoJob) UnmarshalJSON

func (s *VideoJob) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VideoJob) Validate

func (s *VideoJob) Validate() error

type VideoJobStatus

type VideoJobStatus string
const (
	VideoJobStatusPending    VideoJobStatus = "pending"
	VideoJobStatusProcessing VideoJobStatus = "processing"
	VideoJobStatusCompleted  VideoJobStatus = "completed"
	VideoJobStatusFailed     VideoJobStatus = "failed"
)

func (VideoJobStatus) AllValues

func (VideoJobStatus) AllValues() []VideoJobStatus

AllValues returns all VideoJobStatus values.

func (*VideoJobStatus) Decode

func (s *VideoJobStatus) Decode(d *jx.Decoder) error

Decode decodes VideoJobStatus from json.

func (VideoJobStatus) Encode

func (s VideoJobStatus) Encode(e *jx.Encoder)

Encode encodes VideoJobStatus as json.

func (VideoJobStatus) MarshalJSON

func (s VideoJobStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (VideoJobStatus) MarshalText

func (s VideoJobStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*VideoJobStatus) UnmarshalJSON

func (s *VideoJobStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VideoJobStatus) UnmarshalText

func (s *VideoJobStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (VideoJobStatus) Validate

func (s VideoJobStatus) Validate() error

type Voice

type Voice struct {
	ID         OptString      `json:"id"`
	Name       OptString      `json:"name"`
	Gender     OptVoiceGender `json:"gender"`
	Language   OptString      `json:"language"`
	PreviewURL OptURI         `json:"preview_url"`
}

Ref: #/components/schemas/Voice

func (*Voice) Decode

func (s *Voice) Decode(d *jx.Decoder) error

Decode decodes Voice from json.

func (*Voice) Encode

func (s *Voice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Voice) GetGender

func (s *Voice) GetGender() OptVoiceGender

GetGender returns the value of Gender.

func (*Voice) GetID

func (s *Voice) GetID() OptString

GetID returns the value of ID.

func (*Voice) GetLanguage

func (s *Voice) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*Voice) GetName

func (s *Voice) GetName() OptString

GetName returns the value of Name.

func (*Voice) GetPreviewURL

func (s *Voice) GetPreviewURL() OptURI

GetPreviewURL returns the value of PreviewURL.

func (*Voice) MarshalJSON

func (s *Voice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Voice) SetGender

func (s *Voice) SetGender(val OptVoiceGender)

SetGender sets the value of Gender.

func (*Voice) SetID

func (s *Voice) SetID(val OptString)

SetID sets the value of ID.

func (*Voice) SetLanguage

func (s *Voice) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*Voice) SetName

func (s *Voice) SetName(val OptString)

SetName sets the value of Name.

func (*Voice) SetPreviewURL

func (s *Voice) SetPreviewURL(val OptURI)

SetPreviewURL sets the value of PreviewURL.

func (*Voice) UnmarshalJSON

func (s *Voice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Voice) Validate

func (s *Voice) Validate() error

type VoiceGender

type VoiceGender string
const (
	VoiceGenderMale   VoiceGender = "male"
	VoiceGenderFemale VoiceGender = "female"
)

func (VoiceGender) AllValues

func (VoiceGender) AllValues() []VoiceGender

AllValues returns all VoiceGender values.

func (*VoiceGender) Decode

func (s *VoiceGender) Decode(d *jx.Decoder) error

Decode decodes VoiceGender from json.

func (VoiceGender) Encode

func (s VoiceGender) Encode(e *jx.Encoder)

Encode encodes VoiceGender as json.

func (VoiceGender) MarshalJSON

func (s VoiceGender) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (VoiceGender) MarshalText

func (s VoiceGender) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*VoiceGender) UnmarshalJSON

func (s *VoiceGender) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VoiceGender) UnmarshalText

func (s *VoiceGender) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (VoiceGender) Validate

func (s VoiceGender) Validate() error

type VoiceList

type VoiceList struct {
	Voices []Voice `json:"voices"`
}

Ref: #/components/schemas/VoiceList

func (*VoiceList) Decode

func (s *VoiceList) Decode(d *jx.Decoder) error

Decode decodes VoiceList from json.

func (*VoiceList) Encode

func (s *VoiceList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VoiceList) GetVoices

func (s *VoiceList) GetVoices() []Voice

GetVoices returns the value of Voices.

func (*VoiceList) MarshalJSON

func (s *VoiceList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VoiceList) SetVoices

func (s *VoiceList) SetVoices(val []Voice)

SetVoices sets the value of Voices.

func (*VoiceList) UnmarshalJSON

func (s *VoiceList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VoiceList) Validate

func (s *VoiceList) Validate() error

type Webhook

type Webhook struct {
	ID     OptString           `json:"id"`
	URL    OptURI              `json:"url"`
	Events []WebhookEventsItem `json:"events"`
	// Signing secret.
	Secret    OptString   `json:"secret"`
	CreatedAt OptDateTime `json:"created_at"`
}

Ref: #/components/schemas/Webhook

func (*Webhook) Decode

func (s *Webhook) Decode(d *jx.Decoder) error

Decode decodes Webhook from json.

func (*Webhook) Encode

func (s *Webhook) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Webhook) GetCreatedAt

func (s *Webhook) GetCreatedAt() OptDateTime

GetCreatedAt returns the value of CreatedAt.

func (*Webhook) GetEvents

func (s *Webhook) GetEvents() []WebhookEventsItem

GetEvents returns the value of Events.

func (*Webhook) GetID

func (s *Webhook) GetID() OptString

GetID returns the value of ID.

func (*Webhook) GetSecret

func (s *Webhook) GetSecret() OptString

GetSecret returns the value of Secret.

func (*Webhook) GetURL

func (s *Webhook) GetURL() OptURI

GetURL returns the value of URL.

func (*Webhook) MarshalJSON

func (s *Webhook) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Webhook) SetCreatedAt

func (s *Webhook) SetCreatedAt(val OptDateTime)

SetCreatedAt sets the value of CreatedAt.

func (*Webhook) SetEvents

func (s *Webhook) SetEvents(val []WebhookEventsItem)

SetEvents sets the value of Events.

func (*Webhook) SetID

func (s *Webhook) SetID(val OptString)

SetID sets the value of ID.

func (*Webhook) SetSecret

func (s *Webhook) SetSecret(val OptString)

SetSecret sets the value of Secret.

func (*Webhook) SetURL

func (s *Webhook) SetURL(val OptURI)

SetURL sets the value of URL.

func (*Webhook) UnmarshalJSON

func (s *Webhook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Webhook) Validate

func (s *Webhook) Validate() error

type WebhookEventsItem

type WebhookEventsItem string
const (
	WebhookEventsItemAgentReady  WebhookEventsItem = "agent.ready"
	WebhookEventsItemAgentFailed WebhookEventsItem = "agent.failed"
)

func (WebhookEventsItem) AllValues

func (WebhookEventsItem) AllValues() []WebhookEventsItem

AllValues returns all WebhookEventsItem values.

func (*WebhookEventsItem) Decode

func (s *WebhookEventsItem) Decode(d *jx.Decoder) error

Decode decodes WebhookEventsItem from json.

func (WebhookEventsItem) Encode

func (s WebhookEventsItem) Encode(e *jx.Encoder)

Encode encodes WebhookEventsItem as json.

func (WebhookEventsItem) MarshalJSON

func (s WebhookEventsItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (WebhookEventsItem) MarshalText

func (s WebhookEventsItem) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*WebhookEventsItem) UnmarshalJSON

func (s *WebhookEventsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookEventsItem) UnmarshalText

func (s *WebhookEventsItem) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (WebhookEventsItem) Validate

func (s WebhookEventsItem) Validate() error

type WebhookList

type WebhookList struct {
	Webhooks []Webhook `json:"webhooks"`
}

Ref: #/components/schemas/WebhookList

func (*WebhookList) Decode

func (s *WebhookList) Decode(d *jx.Decoder) error

Decode decodes WebhookList from json.

func (*WebhookList) Encode

func (s *WebhookList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WebhookList) GetWebhooks

func (s *WebhookList) GetWebhooks() []Webhook

GetWebhooks returns the value of Webhooks.

func (*WebhookList) MarshalJSON

func (s *WebhookList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WebhookList) SetWebhooks

func (s *WebhookList) SetWebhooks(val []Webhook)

SetWebhooks sets the value of Webhooks.

func (*WebhookList) UnmarshalJSON

func (s *WebhookList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookList) Validate

func (s *WebhookList) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL