operations

package
v0.7.33 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SupportedOptionRetries              = "retries"
	SupportedOptionTimeout              = "timeout"
	SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride"
	SupportedOptionURLOverride          = "urlOverride"
)

Variables

View Source
var ErrUnsupportedOption = errors.New("unsupported option")

Functions

This section is empty.

Types

type AcceptHeaderEnum

type AcceptHeaderEnum string
const (
	AcceptHeaderEnumApplicationJson        AcceptHeaderEnum = "application/json"
	AcceptHeaderEnumTextEventStream        AcceptHeaderEnum = "text/event-stream"
	AcceptHeaderEnumAudioWildcard          AcceptHeaderEnum = "audio/*"
	AcceptHeaderEnumApplicationOctetStream AcceptHeaderEnum = "application/octet-stream"
	AcceptHeaderEnumVideoMp4               AcceptHeaderEnum = "video/mp4"
)

func (AcceptHeaderEnum) ToPointer

func (e AcceptHeaderEnum) ToPointer() *AcceptHeaderEnum

type Arena

type Arena string

Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.

const (
	ArenaModels   Arena = "models"
	ArenaBuilders Arena = "builders"
	ArenaAgents   Arena = "agents"
)

func (*Arena) IsExact

func (e *Arena) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Arena) ToPointer

func (e Arena) ToPointer() *Arena

type BulkAddWorkspaceMembersRequest

type BulkAddWorkspaceMembersRequest struct {
	// The workspace ID (UUID) or slug
	ID                             string                                    `pathParam:"style=simple,explode=false,name=id"`
	BulkAddWorkspaceMembersRequest components.BulkAddWorkspaceMembersRequest `request:"mediaType=application/json"`
}

func (*BulkAddWorkspaceMembersRequest) GetBulkAddWorkspaceMembersRequest

func (b *BulkAddWorkspaceMembersRequest) GetBulkAddWorkspaceMembersRequest() components.BulkAddWorkspaceMembersRequest

func (*BulkAddWorkspaceMembersRequest) GetID

type BulkAssignKeysToGuardrailRequest

type BulkAssignKeysToGuardrailRequest struct {
	// The unique identifier of the guardrail
	ID                    string                           `pathParam:"style=simple,explode=false,name=id"`
	BulkAssignKeysRequest components.BulkAssignKeysRequest `request:"mediaType=application/json"`
}

func (*BulkAssignKeysToGuardrailRequest) GetBulkAssignKeysRequest

func (*BulkAssignKeysToGuardrailRequest) GetID

type BulkAssignMembersToGuardrailRequest

type BulkAssignMembersToGuardrailRequest struct {
	// The unique identifier of the guardrail
	ID                       string                              `pathParam:"style=simple,explode=false,name=id"`
	BulkAssignMembersRequest components.BulkAssignMembersRequest `request:"mediaType=application/json"`
}

func (*BulkAssignMembersToGuardrailRequest) GetBulkAssignMembersRequest

func (*BulkAssignMembersToGuardrailRequest) GetID

type BulkRemoveWorkspaceMembersRequest

type BulkRemoveWorkspaceMembersRequest struct {
	// The workspace ID (UUID) or slug
	ID                                string                                       `pathParam:"style=simple,explode=false,name=id"`
	BulkRemoveWorkspaceMembersRequest components.BulkRemoveWorkspaceMembersRequest `request:"mediaType=application/json"`
}

func (*BulkRemoveWorkspaceMembersRequest) GetBulkRemoveWorkspaceMembersRequest

func (b *BulkRemoveWorkspaceMembersRequest) GetBulkRemoveWorkspaceMembersRequest() components.BulkRemoveWorkspaceMembersRequest

func (*BulkRemoveWorkspaceMembersRequest) GetID

type BulkUnassignKeysFromGuardrailRequest

type BulkUnassignKeysFromGuardrailRequest struct {
	// The unique identifier of the guardrail
	ID                      string                             `pathParam:"style=simple,explode=false,name=id"`
	BulkUnassignKeysRequest components.BulkUnassignKeysRequest `request:"mediaType=application/json"`
}

func (*BulkUnassignKeysFromGuardrailRequest) GetBulkUnassignKeysRequest

func (*BulkUnassignKeysFromGuardrailRequest) GetID

type BulkUnassignMembersFromGuardrailRequest

type BulkUnassignMembersFromGuardrailRequest struct {
	// The unique identifier of the guardrail
	ID                         string                                `pathParam:"style=simple,explode=false,name=id"`
	BulkUnassignMembersRequest components.BulkUnassignMembersRequest `request:"mediaType=application/json"`
}

func (*BulkUnassignMembersFromGuardrailRequest) GetBulkUnassignMembersRequest

func (*BulkUnassignMembersFromGuardrailRequest) GetID

type ClassifierDimensions added in v0.5.14

type ClassifierDimensions struct {
	// UUID of the classifier whose tags to group by.
	ClassifierID   string   `json:"classifier_id"`
	DimensionNames []string `json:"dimension_names,omitzero"`
	// When true, also include generations that have no tag from this classifier. Defaults to false, which returns only classified generations.
	IncludeNulls *bool `json:"include_nulls,omitzero"`
}

ClassifierDimensions - Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.

func (*ClassifierDimensions) GetClassifierID added in v0.5.14

func (c *ClassifierDimensions) GetClassifierID() string

func (*ClassifierDimensions) GetDimensionNames added in v0.5.14

func (c *ClassifierDimensions) GetDimensionNames() []string

func (*ClassifierDimensions) GetIncludeNulls added in v0.5.14

func (c *ClassifierDimensions) GetIncludeNulls() *bool

func (ClassifierDimensions) MarshalJSON added in v0.5.14

func (c ClassifierDimensions) MarshalJSON() ([]byte, error)

func (*ClassifierDimensions) UnmarshalJSON added in v0.5.14

func (c *ClassifierDimensions) UnmarshalJSON(data []byte) error

type ClassifierFilters added in v0.5.14

type ClassifierFilters struct {
	// UUID of the classifier whose tags to filter by. Must match classifier_dimensions.classifier_id when both are specified.
	ClassifierID string                    `json:"classifier_id"`
	Filters      []ClassifierFiltersFilter `json:"filters"`
}

ClassifierFilters - Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.

func (*ClassifierFilters) GetClassifierID added in v0.5.14

func (c *ClassifierFilters) GetClassifierID() string

func (*ClassifierFilters) GetFilters added in v0.5.14

func (c *ClassifierFilters) GetFilters() []ClassifierFiltersFilter

type ClassifierFiltersFilter added in v0.5.14

type ClassifierFiltersFilter struct {
	// Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
	Field string `json:"field"`
	// Filter operator. Only equality/set operators are supported (eq, neq, in, not_in) — ordered comparisons are not available because classification values are strings.
	Operator string `json:"operator"`
	// Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.
	Value ClassifierFiltersValue `json:"value"`
}

func (*ClassifierFiltersFilter) GetField added in v0.5.14

func (c *ClassifierFiltersFilter) GetField() string

func (*ClassifierFiltersFilter) GetOperator added in v0.5.14

func (c *ClassifierFiltersFilter) GetOperator() string

func (*ClassifierFiltersFilter) GetValue added in v0.5.14

type ClassifierFiltersValue added in v0.5.14

type ClassifierFiltersValue struct {
	Str                           *string                  `queryParam:"inline" union:"member"`
	Number                        *float64                 `queryParam:"inline" union:"member"`
	ArrayOfValueClassifierFilters []ValueClassifierFilters `queryParam:"inline" union:"member"`

	Type ClassifierFiltersValueType
}

ClassifierFiltersValue - Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.

func CreateClassifierFiltersValueArrayOfValueClassifierFilters added in v0.5.14

func CreateClassifierFiltersValueArrayOfValueClassifierFilters(arrayOfValueClassifierFilters []ValueClassifierFilters) ClassifierFiltersValue

func CreateClassifierFiltersValueNumber added in v0.5.14

func CreateClassifierFiltersValueNumber(number float64) ClassifierFiltersValue

func CreateClassifierFiltersValueStr added in v0.5.14

func CreateClassifierFiltersValueStr(str string) ClassifierFiltersValue

func (ClassifierFiltersValue) MarshalJSON added in v0.5.14

func (u ClassifierFiltersValue) MarshalJSON() ([]byte, error)

func (*ClassifierFiltersValue) UnmarshalJSON added in v0.5.14

func (u *ClassifierFiltersValue) UnmarshalJSON(data []byte) error

type ClassifierFiltersValueType added in v0.5.14

type ClassifierFiltersValueType string
const (
	ClassifierFiltersValueTypeStr                           ClassifierFiltersValueType = "str"
	ClassifierFiltersValueTypeNumber                        ClassifierFiltersValueType = "number"
	ClassifierFiltersValueTypeArrayOfValueClassifierFilters ClassifierFiltersValueType = "arrayOfValueClassifierFilters"
)

type Content

type Content struct {
	ContentText           *ContentText                      `queryParam:"inline" union:"member"`
	ContentImageURL       *ContentImageURL                  `queryParam:"inline" union:"member"`
	ContentPartInputAudio *components.ContentPartInputAudio `queryParam:"inline" union:"member"`
	ContentPartInputVideo *components.ContentPartInputVideo `queryParam:"inline" union:"member"`
	ContentPartInputFile  *components.ContentPartInputFile  `queryParam:"inline" union:"member"`

	Type ContentType
}

func CreateContentImageURL

func CreateContentImageURL(imageURL ContentImageURL) Content

func CreateContentInputAudio

func CreateContentInputAudio(inputAudio components.ContentPartInputAudio) Content

func CreateContentInputFile

func CreateContentInputFile(inputFile components.ContentPartInputFile) Content

func CreateContentInputVideo

func CreateContentInputVideo(inputVideo components.ContentPartInputVideo) Content

func CreateContentText

func CreateContentText(text ContentText) Content

func (Content) MarshalJSON

func (u Content) MarshalJSON() ([]byte, error)

func (*Content) UnmarshalJSON

func (u *Content) UnmarshalJSON(data []byte) error

type ContentImageURL

type ContentImageURL struct {
	ImageURL ImageURL     `json:"image_url"`
	Type     TypeImageURL `json:"type"`
}

func (*ContentImageURL) GetImageURL

func (c *ContentImageURL) GetImageURL() ImageURL

func (*ContentImageURL) GetType

func (c *ContentImageURL) GetType() TypeImageURL

func (ContentImageURL) MarshalJSON

func (c ContentImageURL) MarshalJSON() ([]byte, error)

func (*ContentImageURL) UnmarshalJSON

func (c *ContentImageURL) UnmarshalJSON(data []byte) error

type ContentText

type ContentText struct {
	Text string   `json:"text"`
	Type TypeText `json:"type"`
}

func (*ContentText) GetText

func (c *ContentText) GetText() string

func (*ContentText) GetType

func (c *ContentText) GetType() TypeText

func (ContentText) MarshalJSON

func (c ContentText) MarshalJSON() ([]byte, error)

func (*ContentText) UnmarshalJSON

func (c *ContentText) UnmarshalJSON(data []byte) error

type ContentType

type ContentType string
const (
	ContentTypeText       ContentType = "text"
	ContentTypeImageURL   ContentType = "image_url"
	ContentTypeInputAudio ContentType = "input_audio"
	ContentTypeInputVideo ContentType = "input_video"
	ContentTypeInputFile  ContentType = "input_file"
)

type ContextBucket added in v0.5.13

type ContextBucket string

ContextBucket - Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.

const (
	ContextBucketOneK        ContextBucket = "1K"
	ContextBucketTenK        ContextBucket = "10K"
	ContextBucketOneHundredK ContextBucket = "100K"
	ContextBucketOneM        ContextBucket = "1M"
	ContextBucketTenM        ContextBucket = "10M"
)

func (*ContextBucket) IsExact added in v0.5.13

func (e *ContextBucket) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (ContextBucket) ToPointer added in v0.5.13

func (e ContextBucket) ToPointer() *ContextBucket

type CreateAudioTranscriptionsMultipartFile added in v0.5.13

type CreateAudioTranscriptionsMultipartFile struct {
	FileName string `multipartForm:"name=fileName"`
	// This field accepts []byte data or io.Reader implementations, such as *os.File.
	Content any `multipartForm:"content"`
}

func (*CreateAudioTranscriptionsMultipartFile) GetContent added in v0.5.13

func (*CreateAudioTranscriptionsMultipartFile) GetFileName added in v0.5.13

type CreateAudioTranscriptionsMultipartRequest added in v0.5.13

type CreateAudioTranscriptionsMultipartRequest struct {
	// The audio file to transcribe. The format is derived from the filename extension or the file part content type. Max 25 MB; send larger files as base64 JSON via input_audio.
	File CreateAudioTranscriptionsMultipartFile `multipartForm:"file,name=file"`
	// The language of the input audio (ISO-639-1).
	Language *string `multipartForm:"name=language"`
	// The model to use for transcription.
	Model string `multipartForm:"name=model"`
	// The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
	ResponseFormat *ResponseFormat `multipartForm:"name=response_format"`
	// The sampling temperature.
	Temperature *float64 `multipartForm:"name=temperature"`
	// Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array.
	TimestampGranularities []TimestampGranularities `multipartForm:"name=timestamp_granularities[]"`
}

func (*CreateAudioTranscriptionsMultipartRequest) GetFile added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) GetLanguage added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) GetModel added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) GetResponseFormat added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) GetTemperature added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) GetTimestampGranularities added in v0.5.13

func (c *CreateAudioTranscriptionsMultipartRequest) GetTimestampGranularities() []TimestampGranularities

func (CreateAudioTranscriptionsMultipartRequest) MarshalJSON added in v0.5.13

func (*CreateAudioTranscriptionsMultipartRequest) UnmarshalJSON added in v0.5.13

func (c *CreateAudioTranscriptionsMultipartRequest) UnmarshalJSON(data []byte) error

type CreateAuthKeysCodeCodeChallengeMethod

type CreateAuthKeysCodeCodeChallengeMethod string

CreateAuthKeysCodeCodeChallengeMethod - The method used to generate the code challenge

const (
	CreateAuthKeysCodeCodeChallengeMethodS256  CreateAuthKeysCodeCodeChallengeMethod = "S256"
	CreateAuthKeysCodeCodeChallengeMethodPlain CreateAuthKeysCodeCodeChallengeMethod = "plain"
)

func (*CreateAuthKeysCodeCodeChallengeMethod) IsExact

IsExact returns true if the value matches a known enum value, false otherwise.

func (CreateAuthKeysCodeCodeChallengeMethod) ToPointer

type CreateAuthKeysCodeData

type CreateAuthKeysCodeData struct {
	// The application ID associated with this auth code
	AppID int64 `json:"app_id"`
	// ISO 8601 timestamp of when the auth code was created
	CreatedAt string `json:"created_at"`
	// The authorization code ID to use in the exchange request
	ID string `json:"id"`
}

CreateAuthKeysCodeData - Auth code data

func (*CreateAuthKeysCodeData) GetAppID

func (c *CreateAuthKeysCodeData) GetAppID() int64

func (*CreateAuthKeysCodeData) GetCreatedAt

func (c *CreateAuthKeysCodeData) GetCreatedAt() string

func (*CreateAuthKeysCodeData) GetID

func (c *CreateAuthKeysCodeData) GetID() string

type CreateAuthKeysCodeRequest

type CreateAuthKeysCodeRequest struct {
	// The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools.
	CallbackURL string `json:"callback_url"`
	// PKCE code challenge for enhanced security
	CodeChallenge *string `json:"code_challenge,omitzero"`
	// The method used to generate the code challenge
	CodeChallengeMethod *CreateAuthKeysCodeCodeChallengeMethod `json:"code_challenge_method,omitzero"`
	// Optional expiration time for the API key to be created
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Optional custom label for the API key. Defaults to the app name if not provided.
	KeyLabel *string `json:"key_label,omitzero"`
	// Credit limit for the API key to be created
	Limit *float64 `json:"limit,omitzero"`
	// Optional credit limit reset interval. When set, the credit limit resets on this interval.
	UsageLimitType *UsageLimitType `json:"usage_limit_type,omitzero"`
	// Optional workspace ID to associate the API key with
	WorkspaceID *string `json:"workspace_id,omitzero"`
}

func (*CreateAuthKeysCodeRequest) GetCallbackURL

func (c *CreateAuthKeysCodeRequest) GetCallbackURL() string

func (*CreateAuthKeysCodeRequest) GetCodeChallenge

func (c *CreateAuthKeysCodeRequest) GetCodeChallenge() *string

func (*CreateAuthKeysCodeRequest) GetCodeChallengeMethod

func (*CreateAuthKeysCodeRequest) GetExpiresAt

func (*CreateAuthKeysCodeRequest) GetKeyLabel

func (c *CreateAuthKeysCodeRequest) GetKeyLabel() *string

func (*CreateAuthKeysCodeRequest) GetLimit

func (c *CreateAuthKeysCodeRequest) GetLimit() *float64

func (*CreateAuthKeysCodeRequest) GetUsageLimitType

func (c *CreateAuthKeysCodeRequest) GetUsageLimitType() *UsageLimitType

func (*CreateAuthKeysCodeRequest) GetWorkspaceID

func (c *CreateAuthKeysCodeRequest) GetWorkspaceID() *string

func (CreateAuthKeysCodeRequest) MarshalJSON

func (c CreateAuthKeysCodeRequest) MarshalJSON() ([]byte, error)

func (*CreateAuthKeysCodeRequest) UnmarshalJSON

func (c *CreateAuthKeysCodeRequest) UnmarshalJSON(data []byte) error

type CreateAuthKeysCodeResponse

type CreateAuthKeysCodeResponse struct {
	// Auth code data
	Data CreateAuthKeysCodeData `json:"data"`
}

CreateAuthKeysCodeResponse - Successfully created authorization code

func (*CreateAuthKeysCodeResponse) GetData

type CreateEmbeddingsData

type CreateEmbeddingsData struct {
	// Embedding vector as an array of floats or a base64 string
	Embedding Embedding `json:"embedding"`
	// Index of the embedding in the input list
	Index  *int64          `json:"index,omitzero"`
	Object ObjectEmbedding `json:"object"`
}

CreateEmbeddingsData - A single embedding object

func (*CreateEmbeddingsData) GetEmbedding

func (c *CreateEmbeddingsData) GetEmbedding() Embedding

func (*CreateEmbeddingsData) GetIndex

func (c *CreateEmbeddingsData) GetIndex() *int64

func (*CreateEmbeddingsData) GetObject

func (c *CreateEmbeddingsData) GetObject() ObjectEmbedding

type CreateEmbeddingsRequest

type CreateEmbeddingsRequest struct {
	// The number of dimensions for the output embeddings
	Dimensions *int64 `json:"dimensions,omitzero"`
	// The format of the output embeddings
	EncodingFormat *EncodingFormat `json:"encoding_format,omitzero"`
	// Text, token, or multimodal input(s) to embed
	Input InputUnion `json:"input"`
	// The type of input (e.g. search_query, search_document)
	InputType *string `json:"input_type,omitzero"`
	// The model to use for embeddings
	Model    string                                                            `json:"model"`
	Provider optionalnullable.OptionalNullable[components.ProviderPreferences] `json:"provider,omitzero"`
	// A unique identifier for the end-user
	User *string `json:"user,omitzero"`
}

CreateEmbeddingsRequest - Embeddings request input

func (*CreateEmbeddingsRequest) GetDimensions

func (c *CreateEmbeddingsRequest) GetDimensions() *int64

func (*CreateEmbeddingsRequest) GetEncodingFormat

func (c *CreateEmbeddingsRequest) GetEncodingFormat() *EncodingFormat

func (*CreateEmbeddingsRequest) GetInput

func (c *CreateEmbeddingsRequest) GetInput() InputUnion

func (*CreateEmbeddingsRequest) GetInputType

func (c *CreateEmbeddingsRequest) GetInputType() *string

func (*CreateEmbeddingsRequest) GetModel

func (c *CreateEmbeddingsRequest) GetModel() string

func (*CreateEmbeddingsRequest) GetProvider

func (*CreateEmbeddingsRequest) GetUser

func (c *CreateEmbeddingsRequest) GetUser() *string

func (CreateEmbeddingsRequest) MarshalJSON

func (c CreateEmbeddingsRequest) MarshalJSON() ([]byte, error)

func (*CreateEmbeddingsRequest) UnmarshalJSON

func (c *CreateEmbeddingsRequest) UnmarshalJSON(data []byte) error

type CreateEmbeddingsResponse

type CreateEmbeddingsResponse struct {
	CreateEmbeddingsResponseBody *CreateEmbeddingsResponseBody `queryParam:"inline" union:"member"`
	Str                          *string                       `queryParam:"inline" union:"member"`

	Type CreateEmbeddingsResponseType
}

func CreateCreateEmbeddingsResponseCreateEmbeddingsResponseBody

func CreateCreateEmbeddingsResponseCreateEmbeddingsResponseBody(createEmbeddingsResponseBody CreateEmbeddingsResponseBody) CreateEmbeddingsResponse

func CreateCreateEmbeddingsResponseStr

func CreateCreateEmbeddingsResponseStr(str string) CreateEmbeddingsResponse

func (CreateEmbeddingsResponse) MarshalJSON

func (u CreateEmbeddingsResponse) MarshalJSON() ([]byte, error)

func (*CreateEmbeddingsResponse) UnmarshalJSON

func (u *CreateEmbeddingsResponse) UnmarshalJSON(data []byte) error

type CreateEmbeddingsResponseBody

type CreateEmbeddingsResponseBody struct {
	// List of embedding objects
	Data []CreateEmbeddingsData `json:"data"`
	// Unique identifier for the embeddings response
	ID *string `json:"id,omitzero"`
	// The model used for embeddings
	Model  string `json:"model"`
	Object Object `json:"object"`
	// Token usage statistics
	Usage *CreateEmbeddingsUsage `json:"usage,omitzero"`
}

CreateEmbeddingsResponseBody - Embeddings response containing embedding vectors

func (*CreateEmbeddingsResponseBody) GetData

func (*CreateEmbeddingsResponseBody) GetID

func (*CreateEmbeddingsResponseBody) GetModel

func (c *CreateEmbeddingsResponseBody) GetModel() string

func (*CreateEmbeddingsResponseBody) GetObject

func (c *CreateEmbeddingsResponseBody) GetObject() Object

func (*CreateEmbeddingsResponseBody) GetUsage

func (CreateEmbeddingsResponseBody) MarshalJSON

func (c CreateEmbeddingsResponseBody) MarshalJSON() ([]byte, error)

func (*CreateEmbeddingsResponseBody) UnmarshalJSON

func (c *CreateEmbeddingsResponseBody) UnmarshalJSON(data []byte) error

type CreateEmbeddingsResponseType

type CreateEmbeddingsResponseType string
const (
	CreateEmbeddingsResponseTypeCreateEmbeddingsResponseBody CreateEmbeddingsResponseType = "createEmbeddings_ResponseBody"
	CreateEmbeddingsResponseTypeStr                          CreateEmbeddingsResponseType = "str"
)

type CreateEmbeddingsUsage

type CreateEmbeddingsUsage struct {
	// Cost of the request in credits
	Cost *float64 `json:"cost,omitzero"`
	// Breakdown of upstream inference costs
	CostDetails optionalnullable.OptionalNullable[components.CostDetails] `json:"cost_details,omitzero"`
	// Whether a request was made using a Bring Your Own Key configuration
	IsBYOK *bool `json:"is_byok,omitzero"`
	// Number of tokens in the input
	PromptTokens int64 `json:"prompt_tokens"`
	// Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
	PromptTokensDetails *PromptTokensDetails `json:"prompt_tokens_details,omitzero"`
	// Total number of tokens used
	TotalTokens int64 `json:"total_tokens"`
}

CreateEmbeddingsUsage - Token usage statistics

func (*CreateEmbeddingsUsage) GetCost

func (c *CreateEmbeddingsUsage) GetCost() *float64

func (*CreateEmbeddingsUsage) GetCostDetails

func (*CreateEmbeddingsUsage) GetIsBYOK added in v0.7.13

func (c *CreateEmbeddingsUsage) GetIsBYOK() *bool

func (*CreateEmbeddingsUsage) GetPromptTokens

func (c *CreateEmbeddingsUsage) GetPromptTokens() int64

func (*CreateEmbeddingsUsage) GetPromptTokensDetails

func (c *CreateEmbeddingsUsage) GetPromptTokensDetails() *PromptTokensDetails

func (*CreateEmbeddingsUsage) GetTotalTokens

func (c *CreateEmbeddingsUsage) GetTotalTokens() int64

func (CreateEmbeddingsUsage) MarshalJSON

func (c CreateEmbeddingsUsage) MarshalJSON() ([]byte, error)

func (*CreateEmbeddingsUsage) UnmarshalJSON

func (c *CreateEmbeddingsUsage) UnmarshalJSON(data []byte) error

type CreateImagesResponse

type CreateImagesResponse struct {
	ImageGenerationResponse *components.ImageGenerationResponse                    `queryParam:"inline" union:"member"`
	EventStream             *stream.EventStream[components.ImageStreamingResponse] `queryParam:"inline" union:"member"`

	Type CreateImagesResponseType
}

func CreateCreateImagesResponseImageGenerationResponse

func CreateCreateImagesResponseImageGenerationResponse(imageGenerationResponse components.ImageGenerationResponse) CreateImagesResponse

func (CreateImagesResponse) MarshalJSON

func (u CreateImagesResponse) MarshalJSON() ([]byte, error)

func (*CreateImagesResponse) UnmarshalJSON

func (u *CreateImagesResponse) UnmarshalJSON(data []byte) error

type CreateImagesResponseType

type CreateImagesResponseType string
const (
	CreateImagesResponseTypeImageGenerationResponse CreateImagesResponseType = "ImageGenerationResponse"
	CreateImagesResponseTypeEventStream             CreateImagesResponseType = "event-stream"
)

type CreateKeysData

type CreateKeysData struct {
	// Total external BYOK usage (in USD) for the API key
	BYOKUsage float64 `json:"byok_usage"`
	// External BYOK usage (in USD) for the current UTC day
	BYOKUsageDaily float64 `json:"byok_usage_daily"`
	// External BYOK usage (in USD) for current UTC month
	BYOKUsageMonthly float64 `json:"byok_usage_monthly"`
	// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
	BYOKUsageWeekly float64 `json:"byok_usage_weekly"`
	// ISO 8601 timestamp of when the API key was created
	CreatedAt string `json:"created_at"`
	// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
	CreatorUserID *string `json:"creator_user_id"`
	// Whether the API key is disabled
	Disabled bool `json:"disabled"`
	// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Unique hash identifier for the API key
	Hash string `json:"hash"`
	// Whether to include external BYOK usage in the credit limit
	IncludeBYOKInLimit bool `json:"include_byok_in_limit"`
	// Human-readable label for the API key
	Label string `json:"label"`
	// Spending limit for the API key in USD
	Limit *float64 `json:"limit"`
	// Remaining spending limit in USD
	LimitRemaining *float64 `json:"limit_remaining"`
	// Type of limit reset for the API key
	LimitReset *string `json:"limit_reset"`
	// Name of the API key
	Name string `json:"name"`
	// ISO 8601 timestamp of when the API key was last updated
	UpdatedAt *string `json:"updated_at"`
	// Total OpenRouter credit usage (in USD) for the API key
	Usage float64 `json:"usage"`
	// OpenRouter credit usage (in USD) for the current UTC day
	UsageDaily float64 `json:"usage_daily"`
	// OpenRouter credit usage (in USD) for the current UTC month
	UsageMonthly float64 `json:"usage_monthly"`
	// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
	UsageWeekly float64 `json:"usage_weekly"`
	// The workspace ID this API key belongs to.
	WorkspaceID string `json:"workspace_id"`
}

CreateKeysData - The created API key information

func (*CreateKeysData) GetBYOKUsage added in v0.7.13

func (c *CreateKeysData) GetBYOKUsage() float64

func (*CreateKeysData) GetBYOKUsageDaily added in v0.7.13

func (c *CreateKeysData) GetBYOKUsageDaily() float64

func (*CreateKeysData) GetBYOKUsageMonthly added in v0.7.13

func (c *CreateKeysData) GetBYOKUsageMonthly() float64

func (*CreateKeysData) GetBYOKUsageWeekly added in v0.7.13

func (c *CreateKeysData) GetBYOKUsageWeekly() float64

func (*CreateKeysData) GetCreatedAt

func (c *CreateKeysData) GetCreatedAt() string

func (*CreateKeysData) GetCreatorUserID

func (c *CreateKeysData) GetCreatorUserID() *string

func (*CreateKeysData) GetDisabled

func (c *CreateKeysData) GetDisabled() bool

func (*CreateKeysData) GetExpiresAt

func (*CreateKeysData) GetHash

func (c *CreateKeysData) GetHash() string

func (*CreateKeysData) GetIncludeBYOKInLimit added in v0.7.13

func (c *CreateKeysData) GetIncludeBYOKInLimit() bool

func (*CreateKeysData) GetLabel

func (c *CreateKeysData) GetLabel() string

func (*CreateKeysData) GetLimit

func (c *CreateKeysData) GetLimit() *float64

func (*CreateKeysData) GetLimitRemaining

func (c *CreateKeysData) GetLimitRemaining() *float64

func (*CreateKeysData) GetLimitReset

func (c *CreateKeysData) GetLimitReset() *string

func (*CreateKeysData) GetName

func (c *CreateKeysData) GetName() string

func (*CreateKeysData) GetUpdatedAt

func (c *CreateKeysData) GetUpdatedAt() *string

func (*CreateKeysData) GetUsage

func (c *CreateKeysData) GetUsage() float64

func (*CreateKeysData) GetUsageDaily

func (c *CreateKeysData) GetUsageDaily() float64

func (*CreateKeysData) GetUsageMonthly

func (c *CreateKeysData) GetUsageMonthly() float64

func (*CreateKeysData) GetUsageWeekly

func (c *CreateKeysData) GetUsageWeekly() float64

func (*CreateKeysData) GetWorkspaceID

func (c *CreateKeysData) GetWorkspaceID() string

func (CreateKeysData) MarshalJSON

func (c CreateKeysData) MarshalJSON() ([]byte, error)

func (*CreateKeysData) UnmarshalJSON

func (c *CreateKeysData) UnmarshalJSON(data []byte) error

type CreateKeysLimitReset

type CreateKeysLimitReset string

CreateKeysLimitReset - Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.

const (
	CreateKeysLimitResetDaily   CreateKeysLimitReset = "daily"
	CreateKeysLimitResetWeekly  CreateKeysLimitReset = "weekly"
	CreateKeysLimitResetMonthly CreateKeysLimitReset = "monthly"
)

func (*CreateKeysLimitReset) IsExact

func (e *CreateKeysLimitReset) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (CreateKeysLimitReset) ToPointer

type CreateKeysRequest

type CreateKeysRequest struct {
	// Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.
	CreatorUserID optionalnullable.OptionalNullable[string] `json:"creator_user_id,omitzero"`
	// Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Whether to include BYOK usage in the limit
	IncludeBYOKInLimit *bool `json:"include_byok_in_limit,omitzero"`
	// Optional spending limit for the API key in USD
	Limit optionalnullable.OptionalNullable[float64] `json:"limit,omitzero"`
	// Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
	LimitReset optionalnullable.OptionalNullable[CreateKeysLimitReset] `json:"limit_reset,omitzero"`
	// Name for the new API key
	Name string `json:"name"`
	// The workspace to create the API key in. Defaults to the default workspace if not provided.
	WorkspaceID *string `json:"workspace_id,omitzero"`
}

func (*CreateKeysRequest) GetCreatorUserID

func (*CreateKeysRequest) GetExpiresAt

func (*CreateKeysRequest) GetIncludeBYOKInLimit added in v0.7.13

func (c *CreateKeysRequest) GetIncludeBYOKInLimit() *bool

func (*CreateKeysRequest) GetLimit

func (*CreateKeysRequest) GetLimitReset

func (*CreateKeysRequest) GetName

func (c *CreateKeysRequest) GetName() string

func (*CreateKeysRequest) GetWorkspaceID

func (c *CreateKeysRequest) GetWorkspaceID() *string

func (CreateKeysRequest) MarshalJSON

func (c CreateKeysRequest) MarshalJSON() ([]byte, error)

func (*CreateKeysRequest) UnmarshalJSON

func (c *CreateKeysRequest) UnmarshalJSON(data []byte) error

type CreateKeysResponse

type CreateKeysResponse struct {
	// The created API key information
	Data CreateKeysData `json:"data"`
	// The actual API key string (only shown once)
	Key string `json:"key"`
}

CreateKeysResponse - API key created successfully

func (*CreateKeysResponse) GetData

func (c *CreateKeysResponse) GetData() CreateKeysData

func (*CreateKeysResponse) GetKey

func (c *CreateKeysResponse) GetKey() string

type CreatePresetsChatCompletionsRequest

type CreatePresetsChatCompletionsRequest struct {
	// URL-safe slug identifying the preset. Created if it does not exist.
	Slug        string                 `pathParam:"style=simple,explode=false,name=slug"`
	ChatRequest components.ChatRequest `request:"mediaType=application/json"`
}

func (*CreatePresetsChatCompletionsRequest) GetChatRequest

func (*CreatePresetsChatCompletionsRequest) GetSlug

type CreatePresetsMessagesRequest

type CreatePresetsMessagesRequest struct {
	// URL-safe slug identifying the preset. Created if it does not exist.
	Slug            string                     `pathParam:"style=simple,explode=false,name=slug"`
	MessagesRequest components.MessagesRequest `request:"mediaType=application/json"`
}

func (*CreatePresetsMessagesRequest) GetMessagesRequest

func (*CreatePresetsMessagesRequest) GetSlug

func (c *CreatePresetsMessagesRequest) GetSlug() string

type CreatePresetsResponsesRequest

type CreatePresetsResponsesRequest struct {
	// URL-safe slug identifying the preset. Created if it does not exist.
	Slug             string                      `pathParam:"style=simple,explode=false,name=slug"`
	ResponsesRequest components.ResponsesRequest `request:"mediaType=application/json"`
}

func (*CreatePresetsResponsesRequest) GetResponsesRequest

func (*CreatePresetsResponsesRequest) GetSlug

type CreateRerankRequest

type CreateRerankRequest struct {
	// The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models.
	Documents []Document `json:"documents"`
	// The rerank model to use
	Model    string                                                            `json:"model"`
	Provider optionalnullable.OptionalNullable[components.ProviderPreferences] `json:"provider,omitzero"`
	// The search query to rerank documents against
	Query string `json:"query"`
	// Number of most relevant documents to return
	TopN *int64 `json:"top_n,omitzero"`
}

CreateRerankRequest - Rerank request input

func (*CreateRerankRequest) GetDocuments

func (c *CreateRerankRequest) GetDocuments() []Document

func (*CreateRerankRequest) GetModel

func (c *CreateRerankRequest) GetModel() string

func (*CreateRerankRequest) GetQuery

func (c *CreateRerankRequest) GetQuery() string

func (*CreateRerankRequest) GetTopN

func (c *CreateRerankRequest) GetTopN() *int64

func (CreateRerankRequest) MarshalJSON

func (c CreateRerankRequest) MarshalJSON() ([]byte, error)

func (*CreateRerankRequest) UnmarshalJSON

func (c *CreateRerankRequest) UnmarshalJSON(data []byte) error

type CreateRerankResponse

type CreateRerankResponse struct {
	CreateRerankResponseBody *CreateRerankResponseBody `queryParam:"inline" union:"member"`
	Str                      *string                   `queryParam:"inline" union:"member"`

	Type CreateRerankResponseType
}

func CreateCreateRerankResponseCreateRerankResponseBody

func CreateCreateRerankResponseCreateRerankResponseBody(createRerankResponseBody CreateRerankResponseBody) CreateRerankResponse

func CreateCreateRerankResponseStr

func CreateCreateRerankResponseStr(str string) CreateRerankResponse

func (CreateRerankResponse) MarshalJSON

func (u CreateRerankResponse) MarshalJSON() ([]byte, error)

func (*CreateRerankResponse) UnmarshalJSON

func (u *CreateRerankResponse) UnmarshalJSON(data []byte) error

type CreateRerankResponseBody

type CreateRerankResponseBody struct {
	// Unique identifier for the rerank response (ORID format)
	ID *string `json:"id,omitzero"`
	// The model used for reranking
	Model string `json:"model"`
	// The provider that served the rerank request
	Provider *string `json:"provider,omitzero"`
	// List of rerank results sorted by relevance
	Results []Result `json:"results"`
	// Usage statistics
	Usage *CreateRerankUsage `json:"usage,omitzero"`
}

CreateRerankResponseBody - Rerank response containing ranked results

func (*CreateRerankResponseBody) GetID

func (c *CreateRerankResponseBody) GetID() *string

func (*CreateRerankResponseBody) GetModel

func (c *CreateRerankResponseBody) GetModel() string

func (*CreateRerankResponseBody) GetProvider

func (c *CreateRerankResponseBody) GetProvider() *string

func (*CreateRerankResponseBody) GetResults

func (c *CreateRerankResponseBody) GetResults() []Result

func (*CreateRerankResponseBody) GetUsage

func (CreateRerankResponseBody) MarshalJSON

func (c CreateRerankResponseBody) MarshalJSON() ([]byte, error)

func (*CreateRerankResponseBody) UnmarshalJSON

func (c *CreateRerankResponseBody) UnmarshalJSON(data []byte) error

type CreateRerankResponseType

type CreateRerankResponseType string
const (
	CreateRerankResponseTypeCreateRerankResponseBody CreateRerankResponseType = "createRerank_ResponseBody"
	CreateRerankResponseTypeStr                      CreateRerankResponseType = "str"
)

type CreateRerankUsage

type CreateRerankUsage struct {
	// Cost of the request in credits
	Cost *float64 `json:"cost,omitzero"`
	// Number of search units consumed (Cohere billing)
	SearchUnits *int64 `json:"search_units,omitzero"`
	// Total number of tokens used
	TotalTokens *int64 `json:"total_tokens,omitzero"`
}

CreateRerankUsage - Usage statistics

func (*CreateRerankUsage) GetCost

func (c *CreateRerankUsage) GetCost() *float64

func (*CreateRerankUsage) GetSearchUnits

func (c *CreateRerankUsage) GetSearchUnits() *int64

func (*CreateRerankUsage) GetTotalTokens

func (c *CreateRerankUsage) GetTotalTokens() *int64

type CreateResponsesRequest

type CreateResponsesRequest struct {
	// Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
	XOpenRouterMetadata *components.MetadataLevel   `header:"style=simple,explode=false,name=X-OpenRouter-Metadata"`
	ResponsesRequest    components.ResponsesRequest `request:"mediaType=application/json"`
}

func (*CreateResponsesRequest) GetResponsesRequest

func (c *CreateResponsesRequest) GetResponsesRequest() components.ResponsesRequest

func (*CreateResponsesRequest) GetXOpenRouterMetadata

func (c *CreateResponsesRequest) GetXOpenRouterMetadata() *components.MetadataLevel

type CreateResponsesResponse

type CreateResponsesResponse struct {
	OpenResponsesResult *components.OpenResponsesResult                            `queryParam:"inline" union:"member"`
	EventStream         *stream.EventStream[components.ResponsesStreamingResponse] `queryParam:"inline" union:"member"`

	Type CreateResponsesResponseType
}

func CreateCreateResponsesResponseOpenResponsesResult

func CreateCreateResponsesResponseOpenResponsesResult(openResponsesResult components.OpenResponsesResult) CreateResponsesResponse

func (CreateResponsesResponse) MarshalJSON

func (u CreateResponsesResponse) MarshalJSON() ([]byte, error)

func (*CreateResponsesResponse) UnmarshalJSON

func (u *CreateResponsesResponse) UnmarshalJSON(data []byte) error

type CreateResponsesResponseType

type CreateResponsesResponseType string
const (
	CreateResponsesResponseTypeOpenResponsesResult CreateResponsesResponseType = "OpenResponsesResult"
	CreateResponsesResponseTypeEventStream         CreateResponsesResponseType = "event-stream"
)

type Datacenter

type Datacenter string
const (
	DatacenterAd Datacenter = "AD"
	DatacenterAe Datacenter = "AE"
	DatacenterAf Datacenter = "AF"
	DatacenterAg Datacenter = "AG"
	DatacenterAi Datacenter = "AI"
	DatacenterAl Datacenter = "AL"
	DatacenterAm Datacenter = "AM"
	DatacenterAo Datacenter = "AO"
	DatacenterAq Datacenter = "AQ"
	DatacenterAr Datacenter = "AR"
	DatacenterAs Datacenter = "AS"
	DatacenterAt Datacenter = "AT"
	DatacenterAu Datacenter = "AU"
	DatacenterAw Datacenter = "AW"
	DatacenterAx Datacenter = "AX"
	DatacenterAz Datacenter = "AZ"
	DatacenterBa Datacenter = "BA"
	DatacenterBb Datacenter = "BB"
	DatacenterBd Datacenter = "BD"
	DatacenterBe Datacenter = "BE"
	DatacenterBf Datacenter = "BF"
	DatacenterBg Datacenter = "BG"
	DatacenterBh Datacenter = "BH"
	DatacenterBi Datacenter = "BI"
	DatacenterBj Datacenter = "BJ"
	DatacenterBl Datacenter = "BL"
	DatacenterBm Datacenter = "BM"
	DatacenterBn Datacenter = "BN"
	DatacenterBo Datacenter = "BO"
	DatacenterBq Datacenter = "BQ"
	DatacenterBr Datacenter = "BR"
	DatacenterBs Datacenter = "BS"
	DatacenterBt Datacenter = "BT"
	DatacenterBv Datacenter = "BV"
	DatacenterBw Datacenter = "BW"
	DatacenterBy Datacenter = "BY"
	DatacenterBz Datacenter = "BZ"
	DatacenterCa Datacenter = "CA"
	DatacenterCc Datacenter = "CC"
	DatacenterCd Datacenter = "CD"
	DatacenterCf Datacenter = "CF"
	DatacenterCg Datacenter = "CG"
	DatacenterCh Datacenter = "CH"
	DatacenterCi Datacenter = "CI"
	DatacenterCk Datacenter = "CK"
	DatacenterCl Datacenter = "CL"
	DatacenterCm Datacenter = "CM"
	DatacenterCn Datacenter = "CN"
	DatacenterCo Datacenter = "CO"
	DatacenterCr Datacenter = "CR"
	DatacenterCu Datacenter = "CU"
	DatacenterCv Datacenter = "CV"
	DatacenterCw Datacenter = "CW"
	DatacenterCx Datacenter = "CX"
	DatacenterCy Datacenter = "CY"
	DatacenterCz Datacenter = "CZ"
	DatacenterDe Datacenter = "DE"
	DatacenterDj Datacenter = "DJ"
	DatacenterDk Datacenter = "DK"
	DatacenterDm Datacenter = "DM"
	DatacenterDo Datacenter = "DO"
	DatacenterDz Datacenter = "DZ"
	DatacenterEc Datacenter = "EC"
	DatacenterEe Datacenter = "EE"
	DatacenterEg Datacenter = "EG"
	DatacenterEh Datacenter = "EH"
	DatacenterEr Datacenter = "ER"
	DatacenterEs Datacenter = "ES"
	DatacenterEt Datacenter = "ET"
	DatacenterFi Datacenter = "FI"
	DatacenterFj Datacenter = "FJ"
	DatacenterFk Datacenter = "FK"
	DatacenterFm Datacenter = "FM"
	DatacenterFo Datacenter = "FO"
	DatacenterFr Datacenter = "FR"
	DatacenterGa Datacenter = "GA"
	DatacenterGb Datacenter = "GB"
	DatacenterGd Datacenter = "GD"
	DatacenterGe Datacenter = "GE"
	DatacenterGf Datacenter = "GF"
	DatacenterGg Datacenter = "GG"
	DatacenterGh Datacenter = "GH"
	DatacenterGi Datacenter = "GI"
	DatacenterGl Datacenter = "GL"
	DatacenterGm Datacenter = "GM"
	DatacenterGn Datacenter = "GN"
	DatacenterGp Datacenter = "GP"
	DatacenterGq Datacenter = "GQ"
	DatacenterGr Datacenter = "GR"
	DatacenterGs Datacenter = "GS"
	DatacenterGt Datacenter = "GT"
	DatacenterGu Datacenter = "GU"
	DatacenterGw Datacenter = "GW"
	DatacenterGy Datacenter = "GY"
	DatacenterHk Datacenter = "HK"
	DatacenterHm Datacenter = "HM"
	DatacenterHn Datacenter = "HN"
	DatacenterHr Datacenter = "HR"
	DatacenterHt Datacenter = "HT"
	DatacenterHu Datacenter = "HU"
	DatacenterID Datacenter = "ID"
	DatacenterIe Datacenter = "IE"
	DatacenterIl Datacenter = "IL"
	DatacenterIm Datacenter = "IM"
	DatacenterIn Datacenter = "IN"
	DatacenterIo Datacenter = "IO"
	DatacenterIq Datacenter = "IQ"
	DatacenterIr Datacenter = "IR"
	DatacenterIs Datacenter = "IS"
	DatacenterIt Datacenter = "IT"
	DatacenterJe Datacenter = "JE"
	DatacenterJm Datacenter = "JM"
	DatacenterJo Datacenter = "JO"
	DatacenterJp Datacenter = "JP"
	DatacenterKe Datacenter = "KE"
	DatacenterKg Datacenter = "KG"
	DatacenterKh Datacenter = "KH"
	DatacenterKi Datacenter = "KI"
	DatacenterKm Datacenter = "KM"
	DatacenterKn Datacenter = "KN"
	DatacenterKp Datacenter = "KP"
	DatacenterKr Datacenter = "KR"
	DatacenterKw Datacenter = "KW"
	DatacenterKy Datacenter = "KY"
	DatacenterKz Datacenter = "KZ"
	DatacenterLa Datacenter = "LA"
	DatacenterLb Datacenter = "LB"
	DatacenterLc Datacenter = "LC"
	DatacenterLi Datacenter = "LI"
	DatacenterLk Datacenter = "LK"
	DatacenterLr Datacenter = "LR"
	DatacenterLs Datacenter = "LS"
	DatacenterLt Datacenter = "LT"
	DatacenterLu Datacenter = "LU"
	DatacenterLv Datacenter = "LV"
	DatacenterLy Datacenter = "LY"
	DatacenterMa Datacenter = "MA"
	DatacenterMc Datacenter = "MC"
	DatacenterMd Datacenter = "MD"
	DatacenterMe Datacenter = "ME"
	DatacenterMf Datacenter = "MF"
	DatacenterMg Datacenter = "MG"
	DatacenterMh Datacenter = "MH"
	DatacenterMk Datacenter = "MK"
	DatacenterMl Datacenter = "ML"
	DatacenterMm Datacenter = "MM"
	DatacenterMn Datacenter = "MN"
	DatacenterMo Datacenter = "MO"
	DatacenterMp Datacenter = "MP"
	DatacenterMq Datacenter = "MQ"
	DatacenterMr Datacenter = "MR"
	DatacenterMs Datacenter = "MS"
	DatacenterMt Datacenter = "MT"
	DatacenterMu Datacenter = "MU"
	DatacenterMv Datacenter = "MV"
	DatacenterMw Datacenter = "MW"
	DatacenterMx Datacenter = "MX"
	DatacenterMy Datacenter = "MY"
	DatacenterMz Datacenter = "MZ"
	DatacenterNa Datacenter = "NA"
	DatacenterNc Datacenter = "NC"
	DatacenterNe Datacenter = "NE"
	DatacenterNf Datacenter = "NF"
	DatacenterNg Datacenter = "NG"
	DatacenterNi Datacenter = "NI"
	DatacenterNl Datacenter = "NL"
	DatacenterNo Datacenter = "NO"
	DatacenterNp Datacenter = "NP"
	DatacenterNr Datacenter = "NR"
	DatacenterNu Datacenter = "NU"
	DatacenterNz Datacenter = "NZ"
	DatacenterOm Datacenter = "OM"
	DatacenterPa Datacenter = "PA"
	DatacenterPe Datacenter = "PE"
	DatacenterPf Datacenter = "PF"
	DatacenterPg Datacenter = "PG"
	DatacenterPh Datacenter = "PH"
	DatacenterPk Datacenter = "PK"
	DatacenterPl Datacenter = "PL"
	DatacenterPm Datacenter = "PM"
	DatacenterPn Datacenter = "PN"
	DatacenterPr Datacenter = "PR"
	DatacenterPs Datacenter = "PS"
	DatacenterPt Datacenter = "PT"
	DatacenterPw Datacenter = "PW"
	DatacenterPy Datacenter = "PY"
	DatacenterQa Datacenter = "QA"
	DatacenterRe Datacenter = "RE"
	DatacenterRo Datacenter = "RO"
	DatacenterRs Datacenter = "RS"
	DatacenterRu Datacenter = "RU"
	DatacenterRw Datacenter = "RW"
	DatacenterSa Datacenter = "SA"
	DatacenterSb Datacenter = "SB"
	DatacenterSc Datacenter = "SC"
	DatacenterSd Datacenter = "SD"
	DatacenterSe Datacenter = "SE"
	DatacenterSg Datacenter = "SG"
	DatacenterSh Datacenter = "SH"
	DatacenterSi Datacenter = "SI"
	DatacenterSj Datacenter = "SJ"
	DatacenterSk Datacenter = "SK"
	DatacenterSl Datacenter = "SL"
	DatacenterSm Datacenter = "SM"
	DatacenterSn Datacenter = "SN"
	DatacenterSo Datacenter = "SO"
	DatacenterSr Datacenter = "SR"
	DatacenterSs Datacenter = "SS"
	DatacenterSt Datacenter = "ST"
	DatacenterSv Datacenter = "SV"
	DatacenterSx Datacenter = "SX"
	DatacenterSy Datacenter = "SY"
	DatacenterSz Datacenter = "SZ"
	DatacenterTc Datacenter = "TC"
	DatacenterTd Datacenter = "TD"
	DatacenterTf Datacenter = "TF"
	DatacenterTg Datacenter = "TG"
	DatacenterTh Datacenter = "TH"
	DatacenterTj Datacenter = "TJ"
	DatacenterTk Datacenter = "TK"
	DatacenterTl Datacenter = "TL"
	DatacenterTm Datacenter = "TM"
	DatacenterTn Datacenter = "TN"
	DatacenterTo Datacenter = "TO"
	DatacenterTr Datacenter = "TR"
	DatacenterTt Datacenter = "TT"
	DatacenterTv Datacenter = "TV"
	DatacenterTw Datacenter = "TW"
	DatacenterTz Datacenter = "TZ"
	DatacenterUa Datacenter = "UA"
	DatacenterUg Datacenter = "UG"
	DatacenterUm Datacenter = "UM"
	DatacenterUs Datacenter = "US"
	DatacenterUy Datacenter = "UY"
	DatacenterUz Datacenter = "UZ"
	DatacenterVa Datacenter = "VA"
	DatacenterVc Datacenter = "VC"
	DatacenterVe Datacenter = "VE"
	DatacenterVg Datacenter = "VG"
	DatacenterVi Datacenter = "VI"
	DatacenterVn Datacenter = "VN"
	DatacenterVu Datacenter = "VU"
	DatacenterWf Datacenter = "WF"
	DatacenterWs Datacenter = "WS"
	DatacenterYe Datacenter = "YE"
	DatacenterYt Datacenter = "YT"
	DatacenterZa Datacenter = "ZA"
	DatacenterZm Datacenter = "ZM"
	DatacenterZw Datacenter = "ZW"
)

func (*Datacenter) IsExact

func (e *Datacenter) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Datacenter) ToPointer

func (e Datacenter) ToPointer() *Datacenter

type DeleteBYOKKeyRequest

type DeleteBYOKKeyRequest struct {
	// The BYOK credential ID (UUID).
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*DeleteBYOKKeyRequest) GetID

func (d *DeleteBYOKKeyRequest) GetID() string

type DeleteFileRequest

type DeleteFileRequest struct {
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
	// Workspace to scope the request to. Defaults to the caller’s default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
	Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}

func (*DeleteFileRequest) GetFileID

func (d *DeleteFileRequest) GetFileID() string

func (*DeleteFileRequest) GetProvider added in v0.7.7

func (d *DeleteFileRequest) GetProvider() *components.FileProvider

func (*DeleteFileRequest) GetWorkspaceID

func (d *DeleteFileRequest) GetWorkspaceID() *string

type DeleteGuardrailRequest

type DeleteGuardrailRequest struct {
	// The unique identifier of the guardrail to delete
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*DeleteGuardrailRequest) GetID

func (d *DeleteGuardrailRequest) GetID() string

type DeleteKeysRequest

type DeleteKeysRequest struct {
	// The hash identifier of the API key to delete
	Hash string `pathParam:"style=simple,explode=false,name=hash"`
}

func (*DeleteKeysRequest) GetHash

func (d *DeleteKeysRequest) GetHash() string

type DeleteKeysResponse

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

DeleteKeysResponse - API key deleted successfully

func (*DeleteKeysResponse) GetDeleted

func (d *DeleteKeysResponse) GetDeleted() bool

func (DeleteKeysResponse) MarshalJSON

func (d DeleteKeysResponse) MarshalJSON() ([]byte, error)

func (*DeleteKeysResponse) UnmarshalJSON

func (d *DeleteKeysResponse) UnmarshalJSON(data []byte) error

type DeleteObservabilityDestinationRequest

type DeleteObservabilityDestinationRequest struct {
	// The destination ID (UUID).
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*DeleteObservabilityDestinationRequest) GetID

type DeleteScimGroupMappingRequest added in v0.7.14

type DeleteScimGroupMappingRequest struct {
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Required. Whether to keep workspace members after deleting the mapping. `false` **removes** the members this mapping granted access to; `true` deletes the mapping while leaving membership intact as manually-managed. There is deliberately no default — omitting it returns `400` so the destructive path cannot be reached by accident. Mirrors the dashboard, whose `DeleteMappingSchema.keepMembers` is likewise required.
	KeepMembers KeepMembers `queryParam:"style=form,explode=true,name=keep_members"`
}

func (*DeleteScimGroupMappingRequest) GetID added in v0.7.14

func (*DeleteScimGroupMappingRequest) GetKeepMembers added in v0.7.14

func (d *DeleteScimGroupMappingRequest) GetKeepMembers() KeepMembers

type DeleteWorkspaceBudgetRequest

type DeleteWorkspaceBudgetRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Budget reset interval. Use "lifetime" for a one-time budget that never resets.
	Interval components.WorkspaceBudgetInterval `pathParam:"style=simple,explode=false,name=interval"`
}

func (*DeleteWorkspaceBudgetRequest) GetID

func (*DeleteWorkspaceBudgetRequest) GetInterval

type DeleteWorkspaceRequest

type DeleteWorkspaceRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*DeleteWorkspaceRequest) GetID

func (d *DeleteWorkspaceRequest) GetID() string

type Dimension

type Dimension struct {
	// Human-readable label
	DisplayLabel string `json:"display_label"`
	// Dimension identifier used in query requests
	Name string `json:"name"`
}

func (*Dimension) GetDisplayLabel

func (d *Dimension) GetDisplayLabel() string

func (*Dimension) GetName

func (d *Dimension) GetName() string

type Direction

type Direction string
const (
	DirectionAsc  Direction = "asc"
	DirectionDesc Direction = "desc"
)

func (*Direction) IsExact

func (e *Direction) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Direction) ToPointer

func (e Direction) ToPointer() *Direction

type DisplayFormat

type DisplayFormat string

DisplayFormat - How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)

const (
	DisplayFormatNumber     DisplayFormat = "number"
	DisplayFormatCurrency   DisplayFormat = "currency"
	DisplayFormatPercent    DisplayFormat = "percent"
	DisplayFormatLatency    DisplayFormat = "latency"
	DisplayFormatThroughput DisplayFormat = "throughput"
)

func (*DisplayFormat) IsExact

func (e *DisplayFormat) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (DisplayFormat) ToPointer

func (e DisplayFormat) ToPointer() *DisplayFormat

type Distillable

type Distillable string

Distillable - Filter by distillation capability. "true" returns only distillable models, "false" excludes them.

const (
	DistillableTrue  Distillable = "true"
	DistillableFalse Distillable = "false"
)

func (*Distillable) IsExact

func (e *Distillable) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Distillable) ToPointer

func (e Distillable) ToPointer() *Distillable

type Document

type Document struct {
	Str             *string          `queryParam:"inline" union:"member"`
	DocumentRequest *DocumentRequest `queryParam:"inline" union:"member"`

	Type DocumentType
}

Document - A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`.

func CreateDocumentDocumentRequest

func CreateDocumentDocumentRequest(documentRequest DocumentRequest) Document

func CreateDocumentStr

func CreateDocumentStr(str string) Document

func (Document) MarshalJSON

func (u Document) MarshalJSON() ([]byte, error)

func (*Document) UnmarshalJSON

func (u *Document) UnmarshalJSON(data []byte) error

type DocumentRequest

type DocumentRequest struct {
	// An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...).
	Image *string `json:"image,omitzero"`
	// The document text
	Text *string `json:"text,omitzero"`
}

DocumentRequest - A structured document with optional text and/or image content. At least one of `text` or `image` must be provided.

func (*DocumentRequest) GetImage

func (d *DocumentRequest) GetImage() *string

func (*DocumentRequest) GetText

func (d *DocumentRequest) GetText() *string

func (DocumentRequest) MarshalJSON

func (d DocumentRequest) MarshalJSON() ([]byte, error)

func (*DocumentRequest) UnmarshalJSON

func (d *DocumentRequest) UnmarshalJSON(data []byte) error

type DocumentResponse

type DocumentResponse struct {
	// The image (URL or data URI) from the original document
	Image *string `json:"image,omitzero"`
	// The document text
	Text *string `json:"text,omitzero"`
}

DocumentResponse - The document object echoing the original input (text and/or image)

func (*DocumentResponse) GetImage

func (d *DocumentResponse) GetImage() *string

func (*DocumentResponse) GetText

func (d *DocumentResponse) GetText() *string

type DocumentType

type DocumentType string
const (
	DocumentTypeStr             DocumentType = "str"
	DocumentTypeDocumentRequest DocumentType = "document_request"
)

type DownloadFileContentRequest

type DownloadFileContentRequest struct {
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
	// Workspace to scope the request to. Defaults to the caller’s default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
	Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}

func (*DownloadFileContentRequest) GetFileID

func (d *DownloadFileContentRequest) GetFileID() string

func (*DownloadFileContentRequest) GetProvider added in v0.7.7

func (*DownloadFileContentRequest) GetWorkspaceID

func (d *DownloadFileContentRequest) GetWorkspaceID() *string

type Embedding

type Embedding struct {
	ArrayOfNumber []float64 `queryParam:"inline" union:"member"`
	Str           *string   `queryParam:"inline" union:"member"`

	Type EmbeddingType
}

Embedding vector as an array of floats or a base64 string

func CreateEmbeddingArrayOfNumber

func CreateEmbeddingArrayOfNumber(arrayOfNumber []float64) Embedding

func CreateEmbeddingStr

func CreateEmbeddingStr(str string) Embedding

func (Embedding) MarshalJSON

func (u Embedding) MarshalJSON() ([]byte, error)

func (*Embedding) UnmarshalJSON

func (u *Embedding) UnmarshalJSON(data []byte) error

type EmbeddingType

type EmbeddingType string
const (
	EmbeddingTypeArrayOfNumber EmbeddingType = "arrayOfNumber"
	EmbeddingTypeStr           EmbeddingType = "str"
)

type EncodingFormat

type EncodingFormat string

EncodingFormat - The format of the output embeddings

const (
	EncodingFormatFloat  EncodingFormat = "float"
	EncodingFormatBase64 EncodingFormat = "base64"
)

func (*EncodingFormat) IsExact

func (e *EncodingFormat) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (EncodingFormat) ToPointer

func (e EncodingFormat) ToPointer() *EncodingFormat

type ExchangeAuthCodeForAPIKeyCodeChallengeMethod

type ExchangeAuthCodeForAPIKeyCodeChallengeMethod string

ExchangeAuthCodeForAPIKeyCodeChallengeMethod - The method used to generate the code challenge

const (
	ExchangeAuthCodeForAPIKeyCodeChallengeMethodS256  ExchangeAuthCodeForAPIKeyCodeChallengeMethod = "S256"
	ExchangeAuthCodeForAPIKeyCodeChallengeMethodPlain ExchangeAuthCodeForAPIKeyCodeChallengeMethod = "plain"
)

func (*ExchangeAuthCodeForAPIKeyCodeChallengeMethod) IsExact

IsExact returns true if the value matches a known enum value, false otherwise.

func (ExchangeAuthCodeForAPIKeyCodeChallengeMethod) ToPointer

type ExchangeAuthCodeForAPIKeyRequest

type ExchangeAuthCodeForAPIKeyRequest struct {
	// The authorization code received from the OAuth redirect
	Code string `json:"code"`
	// The method used to generate the code challenge
	CodeChallengeMethod optionalnullable.OptionalNullable[ExchangeAuthCodeForAPIKeyCodeChallengeMethod] `json:"code_challenge_method,omitzero"`
	// The code verifier if code_challenge was used in the authorization request
	CodeVerifier *string `json:"code_verifier,omitzero"`
}

func (*ExchangeAuthCodeForAPIKeyRequest) GetCode

func (*ExchangeAuthCodeForAPIKeyRequest) GetCodeVerifier

func (e *ExchangeAuthCodeForAPIKeyRequest) GetCodeVerifier() *string

type ExchangeAuthCodeForAPIKeyResponse

type ExchangeAuthCodeForAPIKeyResponse struct {
	// The API key to use for OpenRouter requests
	Key string `json:"key"`
	// User ID associated with the API key
	UserID *string `json:"user_id"`
}

ExchangeAuthCodeForAPIKeyResponse - Successfully exchanged code for an API key

func (*ExchangeAuthCodeForAPIKeyResponse) GetKey

func (*ExchangeAuthCodeForAPIKeyResponse) GetUserID

func (e *ExchangeAuthCodeForAPIKeyResponse) GetUserID() *string

type Filter

type Filter struct {
	// Dimension to filter on. Use the /meta endpoint for available dimensions.
	Field string `json:"field"`
	// Include rows where the dimension has no value. Applies only to the `in` and `not_in` operators and dimensions that have an unset bucket.
	IncludeUnset *bool `json:"include_unset,omitzero"`
	// Filter operator
	Operator string `json:"operator"`
	// Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` — workspace UUID, not the workspace name (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `app` — numeric app ID, not the app title; `model` — permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.
	Value Value1 `json:"value"`
}

func (*Filter) GetField

func (f *Filter) GetField() string

func (*Filter) GetIncludeUnset added in v0.7.23

func (f *Filter) GetIncludeUnset() *bool

func (*Filter) GetOperator

func (f *Filter) GetOperator() string

func (*Filter) GetValue

func (f *Filter) GetValue() Value1

type GetAnalyticsMetaData

type GetAnalyticsMetaData struct {
	Dimensions    []Dimension   `json:"dimensions"`
	Granularities []Granularity `json:"granularities"`
	Metrics       []Metric      `json:"metrics"`
	Operators     []Operator    `json:"operators"`
}

func (*GetAnalyticsMetaData) GetDimensions

func (g *GetAnalyticsMetaData) GetDimensions() []Dimension

func (*GetAnalyticsMetaData) GetGranularities

func (g *GetAnalyticsMetaData) GetGranularities() []Granularity

func (*GetAnalyticsMetaData) GetMetrics

func (g *GetAnalyticsMetaData) GetMetrics() []Metric

func (*GetAnalyticsMetaData) GetOperators

func (g *GetAnalyticsMetaData) GetOperators() []Operator

type GetAnalyticsMetaResponse

type GetAnalyticsMetaResponse struct {
	Data GetAnalyticsMetaData `json:"data"`
}

GetAnalyticsMetaResponse - Returns analytics query metadata

func (*GetAnalyticsMetaResponse) GetData

type GetAppRankingsCategory

type GetAppRankingsCategory string

GetAppRankingsCategory - Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.

const (
	GetAppRankingsCategoryCoding        GetAppRankingsCategory = "coding"
	GetAppRankingsCategoryCreative      GetAppRankingsCategory = "creative"
	GetAppRankingsCategoryProductivity  GetAppRankingsCategory = "productivity"
	GetAppRankingsCategoryEntertainment GetAppRankingsCategory = "entertainment"
)

func (*GetAppRankingsCategory) IsExact

func (e *GetAppRankingsCategory) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GetAppRankingsCategory) ToPointer

type GetAppRankingsRequest

type GetAppRankingsRequest struct {
	// Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
	Category *GetAppRankingsCategory `queryParam:"style=form,explode=true,name=category"`
	// Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
	Subcategory *Subcategory `queryParam:"style=form,explode=true,name=subcategory"`
	// `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
	Sort *GetAppRankingsSort `default:"popular" queryParam:"style=form,explode=true,name=sort"`
	// Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
	StartDate *string `queryParam:"style=form,explode=true,name=start_date"`
	// End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
	EndDate *string `queryParam:"style=form,explode=true,name=end_date"`
	// Maximum number of apps to return (1-100). Defaults to 50.
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
	// Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
}

func (*GetAppRankingsRequest) GetCategory

func (*GetAppRankingsRequest) GetEndDate

func (g *GetAppRankingsRequest) GetEndDate() *string

func (*GetAppRankingsRequest) GetLimit

func (g *GetAppRankingsRequest) GetLimit() *int64

func (*GetAppRankingsRequest) GetOffset

func (*GetAppRankingsRequest) GetSort

func (*GetAppRankingsRequest) GetStartDate

func (g *GetAppRankingsRequest) GetStartDate() *string

func (*GetAppRankingsRequest) GetSubcategory

func (g *GetAppRankingsRequest) GetSubcategory() *Subcategory

func (GetAppRankingsRequest) MarshalJSON

func (g GetAppRankingsRequest) MarshalJSON() ([]byte, error)

func (*GetAppRankingsRequest) UnmarshalJSON

func (g *GetAppRankingsRequest) UnmarshalJSON(data []byte) error

type GetAppRankingsResponse

type GetAppRankingsResponse struct {
	Result components.AppRankingsResponse

	Next func() (*GetAppRankingsResponse, error)
}

func (*GetAppRankingsResponse) GetResult

type GetAppRankingsSort

type GetAppRankingsSort string

GetAppRankingsSort - `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.

const (
	GetAppRankingsSortPopular  GetAppRankingsSort = "popular"
	GetAppRankingsSortTrending GetAppRankingsSort = "trending"
)

func (*GetAppRankingsSort) IsExact

func (e *GetAppRankingsSort) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GetAppRankingsSort) ToPointer

func (e GetAppRankingsSort) ToPointer() *GetAppRankingsSort

type GetBYOKKeyRequest

type GetBYOKKeyRequest struct {
	// The BYOK credential ID (UUID).
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*GetBYOKKeyRequest) GetID

func (g *GetBYOKKeyRequest) GetID() string

type GetBenchmarksRequest

type GetBenchmarksRequest struct {
	// Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
	Source *Source `queryParam:"style=form,explode=true,name=source"`
	// Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
	TaskType *TaskType `queryParam:"style=form,explode=true,name=task_type"`
	// Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
	Arena *Arena `queryParam:"style=form,explode=true,name=arena"`
	// Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
	Category *string `queryParam:"style=form,explode=true,name=category"`
	// Maximum number of items to return. When omitted, all matching results are returned.
	MaxResults *int64 `queryParam:"style=form,explode=true,name=max_results"`
}

func (*GetBenchmarksRequest) GetArena

func (g *GetBenchmarksRequest) GetArena() *Arena

func (*GetBenchmarksRequest) GetCategory

func (g *GetBenchmarksRequest) GetCategory() *string

func (*GetBenchmarksRequest) GetMaxResults

func (g *GetBenchmarksRequest) GetMaxResults() *int64

func (*GetBenchmarksRequest) GetSource

func (g *GetBenchmarksRequest) GetSource() *Source

func (*GetBenchmarksRequest) GetTaskType

func (g *GetBenchmarksRequest) GetTaskType() *TaskType

type GetCreditsData

type GetCreditsData struct {
	// Total credits purchased
	TotalCredits float64 `json:"total_credits"`
	// Total credits used
	TotalUsage float64 `json:"total_usage"`
}

func (*GetCreditsData) GetTotalCredits

func (g *GetCreditsData) GetTotalCredits() float64

func (*GetCreditsData) GetTotalUsage

func (g *GetCreditsData) GetTotalUsage() float64

type GetCreditsResponse

type GetCreditsResponse struct {
	Data GetCreditsData `json:"data"`
}

GetCreditsResponse - Total credits purchased and used

func (*GetCreditsResponse) GetData

func (g *GetCreditsResponse) GetData() GetCreditsData

type GetCurrentKeyData

type GetCurrentKeyData struct {
	// Total external BYOK usage (in USD) for the API key
	BYOKUsage float64 `json:"byok_usage"`
	// External BYOK usage (in USD) for the current UTC day
	BYOKUsageDaily float64 `json:"byok_usage_daily"`
	// External BYOK usage (in USD) for current UTC month
	BYOKUsageMonthly float64 `json:"byok_usage_monthly"`
	// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
	BYOKUsageWeekly float64 `json:"byok_usage_weekly"`
	// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
	CreatorUserID *string `json:"creator_user_id"`
	// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Whether to include external BYOK usage in the credit limit
	IncludeBYOKInLimit bool `json:"include_byok_in_limit"`
	// Whether this is a free tier API key
	IsFreeTier bool `json:"is_free_tier"`
	// Whether this is a management key
	IsManagementKey bool `json:"is_management_key"`
	// Whether this is a management key
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	IsProvisioningKey bool `json:"is_provisioning_key"`
	// Human-readable label for the API key
	Label string `json:"label"`
	// Spending limit for the API key in USD
	Limit *float64 `json:"limit"`
	// Remaining spending limit in USD
	LimitRemaining *float64 `json:"limit_remaining"`
	// Type of limit reset for the API key
	LimitReset *string `json:"limit_reset"`
	// Legacy rate limit information about a key. Will always return -1.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	RateLimit RateLimit `json:"rate_limit"`
	// Total OpenRouter credit usage (in USD) for the API key
	Usage float64 `json:"usage"`
	// OpenRouter credit usage (in USD) for the current UTC day
	UsageDaily float64 `json:"usage_daily"`
	// OpenRouter credit usage (in USD) for the current UTC month
	UsageMonthly float64 `json:"usage_monthly"`
	// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
	UsageWeekly float64 `json:"usage_weekly"`
}

GetCurrentKeyData - Current API key information

func (*GetCurrentKeyData) GetBYOKUsage added in v0.7.13

func (g *GetCurrentKeyData) GetBYOKUsage() float64

func (*GetCurrentKeyData) GetBYOKUsageDaily added in v0.7.13

func (g *GetCurrentKeyData) GetBYOKUsageDaily() float64

func (*GetCurrentKeyData) GetBYOKUsageMonthly added in v0.7.13

func (g *GetCurrentKeyData) GetBYOKUsageMonthly() float64

func (*GetCurrentKeyData) GetBYOKUsageWeekly added in v0.7.13

func (g *GetCurrentKeyData) GetBYOKUsageWeekly() float64

func (*GetCurrentKeyData) GetCreatorUserID

func (g *GetCurrentKeyData) GetCreatorUserID() *string

func (*GetCurrentKeyData) GetExpiresAt

func (*GetCurrentKeyData) GetIncludeBYOKInLimit added in v0.7.13

func (g *GetCurrentKeyData) GetIncludeBYOKInLimit() bool

func (*GetCurrentKeyData) GetIsFreeTier

func (g *GetCurrentKeyData) GetIsFreeTier() bool

func (*GetCurrentKeyData) GetIsManagementKey

func (g *GetCurrentKeyData) GetIsManagementKey() bool

func (*GetCurrentKeyData) GetIsProvisioningKey

func (g *GetCurrentKeyData) GetIsProvisioningKey() bool

func (*GetCurrentKeyData) GetLabel

func (g *GetCurrentKeyData) GetLabel() string

func (*GetCurrentKeyData) GetLimit

func (g *GetCurrentKeyData) GetLimit() *float64

func (*GetCurrentKeyData) GetLimitRemaining

func (g *GetCurrentKeyData) GetLimitRemaining() *float64

func (*GetCurrentKeyData) GetLimitReset

func (g *GetCurrentKeyData) GetLimitReset() *string

func (*GetCurrentKeyData) GetRateLimit

func (g *GetCurrentKeyData) GetRateLimit() RateLimit

func (*GetCurrentKeyData) GetUsage

func (g *GetCurrentKeyData) GetUsage() float64

func (*GetCurrentKeyData) GetUsageDaily

func (g *GetCurrentKeyData) GetUsageDaily() float64

func (*GetCurrentKeyData) GetUsageMonthly

func (g *GetCurrentKeyData) GetUsageMonthly() float64

func (*GetCurrentKeyData) GetUsageWeekly

func (g *GetCurrentKeyData) GetUsageWeekly() float64

func (GetCurrentKeyData) MarshalJSON

func (g GetCurrentKeyData) MarshalJSON() ([]byte, error)

func (*GetCurrentKeyData) UnmarshalJSON

func (g *GetCurrentKeyData) UnmarshalJSON(data []byte) error

type GetCurrentKeyResponse

type GetCurrentKeyResponse struct {
	// Current API key information
	Data GetCurrentKeyData `json:"data"`
}

GetCurrentKeyResponse - API key details

func (*GetCurrentKeyResponse) GetData

type GetFileMetadataRequest

type GetFileMetadataRequest struct {
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
	// Workspace to scope the request to. Defaults to the caller’s default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
	Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}

func (*GetFileMetadataRequest) GetFileID

func (g *GetFileMetadataRequest) GetFileID() string

func (*GetFileMetadataRequest) GetProvider added in v0.7.7

func (*GetFileMetadataRequest) GetWorkspaceID

func (g *GetFileMetadataRequest) GetWorkspaceID() *string

type GetGenerationRequest

type GetGenerationRequest struct {
	// The generation ID
	ID string `queryParam:"style=form,explode=true,name=id"`
}

func (*GetGenerationRequest) GetID

func (g *GetGenerationRequest) GetID() string

type GetGuardrailRequest

type GetGuardrailRequest struct {
	// The unique identifier of the guardrail to retrieve
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*GetGuardrailRequest) GetID

func (g *GetGuardrailRequest) GetID() string

type GetKeyData

type GetKeyData struct {
	// Total external BYOK usage (in USD) for the API key
	BYOKUsage float64 `json:"byok_usage"`
	// External BYOK usage (in USD) for the current UTC day
	BYOKUsageDaily float64 `json:"byok_usage_daily"`
	// External BYOK usage (in USD) for current UTC month
	BYOKUsageMonthly float64 `json:"byok_usage_monthly"`
	// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
	BYOKUsageWeekly float64 `json:"byok_usage_weekly"`
	// ISO 8601 timestamp of when the API key was created
	CreatedAt string `json:"created_at"`
	// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
	CreatorUserID *string `json:"creator_user_id"`
	// Whether the API key is disabled
	Disabled bool `json:"disabled"`
	// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Unique hash identifier for the API key
	Hash string `json:"hash"`
	// Whether to include external BYOK usage in the credit limit
	IncludeBYOKInLimit bool `json:"include_byok_in_limit"`
	// Human-readable label for the API key
	Label string `json:"label"`
	// Spending limit for the API key in USD
	Limit *float64 `json:"limit"`
	// Remaining spending limit in USD
	LimitRemaining *float64 `json:"limit_remaining"`
	// Type of limit reset for the API key
	LimitReset *string `json:"limit_reset"`
	// Name of the API key
	Name string `json:"name"`
	// ISO 8601 timestamp of when the API key was last updated
	UpdatedAt *string `json:"updated_at"`
	// Total OpenRouter credit usage (in USD) for the API key
	Usage float64 `json:"usage"`
	// OpenRouter credit usage (in USD) for the current UTC day
	UsageDaily float64 `json:"usage_daily"`
	// OpenRouter credit usage (in USD) for the current UTC month
	UsageMonthly float64 `json:"usage_monthly"`
	// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
	UsageWeekly float64 `json:"usage_weekly"`
	// The workspace ID this API key belongs to.
	WorkspaceID string `json:"workspace_id"`
}

GetKeyData - The API key information

func (*GetKeyData) GetBYOKUsage added in v0.7.13

func (g *GetKeyData) GetBYOKUsage() float64

func (*GetKeyData) GetBYOKUsageDaily added in v0.7.13

func (g *GetKeyData) GetBYOKUsageDaily() float64

func (*GetKeyData) GetBYOKUsageMonthly added in v0.7.13

func (g *GetKeyData) GetBYOKUsageMonthly() float64

func (*GetKeyData) GetBYOKUsageWeekly added in v0.7.13

func (g *GetKeyData) GetBYOKUsageWeekly() float64

func (*GetKeyData) GetCreatedAt

func (g *GetKeyData) GetCreatedAt() string

func (*GetKeyData) GetCreatorUserID

func (g *GetKeyData) GetCreatorUserID() *string

func (*GetKeyData) GetDisabled

func (g *GetKeyData) GetDisabled() bool

func (*GetKeyData) GetExpiresAt

func (*GetKeyData) GetHash

func (g *GetKeyData) GetHash() string

func (*GetKeyData) GetIncludeBYOKInLimit added in v0.7.13

func (g *GetKeyData) GetIncludeBYOKInLimit() bool

func (*GetKeyData) GetLabel

func (g *GetKeyData) GetLabel() string

func (*GetKeyData) GetLimit

func (g *GetKeyData) GetLimit() *float64

func (*GetKeyData) GetLimitRemaining

func (g *GetKeyData) GetLimitRemaining() *float64

func (*GetKeyData) GetLimitReset

func (g *GetKeyData) GetLimitReset() *string

func (*GetKeyData) GetName

func (g *GetKeyData) GetName() string

func (*GetKeyData) GetUpdatedAt

func (g *GetKeyData) GetUpdatedAt() *string

func (*GetKeyData) GetUsage

func (g *GetKeyData) GetUsage() float64

func (*GetKeyData) GetUsageDaily

func (g *GetKeyData) GetUsageDaily() float64

func (*GetKeyData) GetUsageMonthly

func (g *GetKeyData) GetUsageMonthly() float64

func (*GetKeyData) GetUsageWeekly

func (g *GetKeyData) GetUsageWeekly() float64

func (*GetKeyData) GetWorkspaceID

func (g *GetKeyData) GetWorkspaceID() string

func (GetKeyData) MarshalJSON

func (g GetKeyData) MarshalJSON() ([]byte, error)

func (*GetKeyData) UnmarshalJSON

func (g *GetKeyData) UnmarshalJSON(data []byte) error

type GetKeyRequest

type GetKeyRequest struct {
	// The hash identifier of the API key to retrieve
	Hash string `pathParam:"style=simple,explode=false,name=hash"`
}

func (*GetKeyRequest) GetHash

func (g *GetKeyRequest) GetHash() string

type GetKeyResponse

type GetKeyResponse struct {
	// The API key information
	Data GetKeyData `json:"data"`
}

GetKeyResponse - API key details

func (*GetKeyResponse) GetData

func (g *GetKeyResponse) GetData() GetKeyData

type GetModelRequest

type GetModelRequest struct {
	// The author/organization of the model
	Author string `pathParam:"style=simple,explode=false,name=author"`
	// The model slug, optionally including a variant suffix (e.g. gpt-4 or gpt-4:free)
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
}

func (*GetModelRequest) GetAuthor

func (g *GetModelRequest) GetAuthor() string

func (*GetModelRequest) GetSlug

func (g *GetModelRequest) GetSlug() string

type GetModelsCategory

type GetModelsCategory string

GetModelsCategory - Filter models by use case category

const (
	GetModelsCategoryProgramming  GetModelsCategory = "programming"
	GetModelsCategoryRoleplay     GetModelsCategory = "roleplay"
	GetModelsCategoryMarketing    GetModelsCategory = "marketing"
	GetModelsCategoryMarketingSeo GetModelsCategory = "marketing/seo"
	GetModelsCategoryTechnology   GetModelsCategory = "technology"
	GetModelsCategoryScience      GetModelsCategory = "science"
	GetModelsCategoryTranslation  GetModelsCategory = "translation"
	GetModelsCategoryLegal        GetModelsCategory = "legal"
	GetModelsCategoryFinance      GetModelsCategory = "finance"
	GetModelsCategoryHealth       GetModelsCategory = "health"
	GetModelsCategoryTrivia       GetModelsCategory = "trivia"
	GetModelsCategoryAcademia     GetModelsCategory = "academia"
)

func (*GetModelsCategory) IsExact

func (e *GetModelsCategory) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GetModelsCategory) ToPointer

func (e GetModelsCategory) ToPointer() *GetModelsCategory

type GetModelsRequest

type GetModelsRequest struct {
	// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
	Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
	// Filter models by use case category
	Category *GetModelsCategory `queryParam:"style=form,explode=true,name=category"`
	// Filter models by supported parameter (comma-separated)
	SupportedParameters *string `queryParam:"style=form,explode=true,name=supported_parameters"`
	// Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
	OutputModalities *string `queryParam:"style=form,explode=true,name=output_modalities"`
	// Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
	Sort *GetModelsSort `queryParam:"style=form,explode=true,name=sort"`
	// Free-text search by model name or slug.
	Q *string `queryParam:"style=form,explode=true,name=q"`
	// Filter models by input modality. Comma-separated list of: text, image, audio, file.
	InputModalities *string `queryParam:"style=form,explode=true,name=input_modalities"`
	// Minimum context length (tokens). Models with smaller context are excluded.
	Context *int64 `queryParam:"style=form,explode=true,name=context"`
	// Minimum prompt price in $/M tokens.
	MinPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_price"`
	// Maximum prompt price in $/M tokens.
	MaxPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_price"`
	// Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama).
	Arch *string `queryParam:"style=form,explode=true,name=arch"`
	// Filter models by the organization that created the model. Comma-separated list of author slugs.
	ModelAuthors *string `queryParam:"style=form,explode=true,name=model_authors"`
	// Filter models by hosting provider. Comma-separated list of provider names.
	Providers *string `queryParam:"style=form,explode=true,name=providers"`
	// Filter by distillation capability. "true" returns only distillable models, "false" excludes them.
	Distillable *Distillable `queryParam:"style=form,explode=true,name=distillable"`
	// When set to "true", return only models with zero data retention endpoints.
	Zdr *Zdr `queryParam:"style=form,explode=true,name=zdr"`
	// Filter to models with endpoints in the given data region. Currently only "eu" is supported.
	Region *Region `queryParam:"style=form,explode=true,name=region"`
	// Minimum completion (output) price in $/M tokens.
	MinOutputPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_output_price"`
	// Maximum completion (output) price in $/M tokens.
	MaxOutputPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_output_price"`
	// Minimum model age in days since its creation date.
	MinAgeDays optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=min_age_days"`
	// Maximum model age in days since its creation date.
	MaxAgeDays optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=max_age_days"`
	// Minimum Artificial Analysis intelligence index.
	MinIntelligenceIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_intelligence_index"`
	// Maximum Artificial Analysis intelligence index.
	MaxIntelligenceIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_intelligence_index"`
	// Minimum Artificial Analysis coding index.
	MinCodingIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_coding_index"`
	// Maximum Artificial Analysis coding index.
	MaxCodingIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_coding_index"`
	// Minimum Artificial Analysis agentic index.
	MinAgenticIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_agentic_index"`
	// Maximum Artificial Analysis agentic index.
	MaxAgenticIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_agentic_index"`
	// Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
	MinToolSuccessRate optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_tool_success_rate"`
	// Maximum tool-calling success rate, as a fraction in [0, 1].
	MaxToolSuccessRate optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_tool_success_rate"`
}

func (*GetModelsRequest) GetArch

func (g *GetModelsRequest) GetArch() *string

func (*GetModelsRequest) GetCategory

func (g *GetModelsRequest) GetCategory() *GetModelsCategory

func (*GetModelsRequest) GetContext

func (g *GetModelsRequest) GetContext() *int64

func (*GetModelsRequest) GetDistillable

func (g *GetModelsRequest) GetDistillable() *Distillable

func (*GetModelsRequest) GetInputModalities

func (g *GetModelsRequest) GetInputModalities() *string

func (*GetModelsRequest) GetLimit added in v0.5.18

func (g *GetModelsRequest) GetLimit() *int64

func (*GetModelsRequest) GetMaxAgeDays added in v0.5.13

func (*GetModelsRequest) GetMaxAgenticIndex added in v0.5.13

func (g *GetModelsRequest) GetMaxAgenticIndex() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetMaxCodingIndex added in v0.5.13

func (*GetModelsRequest) GetMaxIntelligenceIndex added in v0.5.13

func (g *GetModelsRequest) GetMaxIntelligenceIndex() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetMaxOutputPrice added in v0.5.13

func (*GetModelsRequest) GetMaxPrice

func (*GetModelsRequest) GetMaxToolSuccessRate added in v0.5.13

func (g *GetModelsRequest) GetMaxToolSuccessRate() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetMinAgeDays added in v0.5.13

func (*GetModelsRequest) GetMinAgenticIndex added in v0.5.13

func (g *GetModelsRequest) GetMinAgenticIndex() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetMinCodingIndex added in v0.5.13

func (*GetModelsRequest) GetMinIntelligenceIndex added in v0.5.13

func (g *GetModelsRequest) GetMinIntelligenceIndex() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetMinOutputPrice added in v0.5.13

func (*GetModelsRequest) GetMinPrice

func (*GetModelsRequest) GetMinToolSuccessRate added in v0.5.13

func (g *GetModelsRequest) GetMinToolSuccessRate() optionalnullable.OptionalNullable[float64]

func (*GetModelsRequest) GetModelAuthors

func (g *GetModelsRequest) GetModelAuthors() *string

func (*GetModelsRequest) GetOffset added in v0.5.18

func (*GetModelsRequest) GetOutputModalities

func (g *GetModelsRequest) GetOutputModalities() *string

func (*GetModelsRequest) GetProviders

func (g *GetModelsRequest) GetProviders() *string

func (*GetModelsRequest) GetQ

func (g *GetModelsRequest) GetQ() *string

func (*GetModelsRequest) GetRegion

func (g *GetModelsRequest) GetRegion() *Region

func (*GetModelsRequest) GetSort

func (g *GetModelsRequest) GetSort() *GetModelsSort

func (*GetModelsRequest) GetSupportedParameters

func (g *GetModelsRequest) GetSupportedParameters() *string

func (*GetModelsRequest) GetZdr

func (g *GetModelsRequest) GetZdr() *Zdr

func (GetModelsRequest) MarshalJSON added in v0.5.18

func (g GetModelsRequest) MarshalJSON() ([]byte, error)

func (*GetModelsRequest) UnmarshalJSON added in v0.5.18

func (g *GetModelsRequest) UnmarshalJSON(data []byte) error

type GetModelsResponse added in v0.5.18

type GetModelsResponse struct {
	Result components.ModelsListResponse

	Next func() (*GetModelsResponse, error)
}

func (*GetModelsResponse) GetResult added in v0.5.18

type GetModelsSort

type GetModelsSort string

GetModelsSort - Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.

const (
	GetModelsSortMostPopular             GetModelsSort = "most-popular"
	GetModelsSortNewest                  GetModelsSort = "newest"
	GetModelsSortTopWeekly               GetModelsSort = "top-weekly"
	GetModelsSortPricingLowToHigh        GetModelsSort = "pricing-low-to-high"
	GetModelsSortPricingHighToLow        GetModelsSort = "pricing-high-to-low"
	GetModelsSortContextHighToLow        GetModelsSort = "context-high-to-low"
	GetModelsSortThroughputHighToLow     GetModelsSort = "throughput-high-to-low"
	GetModelsSortLatencyLowToHigh        GetModelsSort = "latency-low-to-high"
	GetModelsSortIntelligenceHighToLow   GetModelsSort = "intelligence-high-to-low"
	GetModelsSortCodingHighToLow         GetModelsSort = "coding-high-to-low"
	GetModelsSortAgenticHighToLow        GetModelsSort = "agentic-high-to-low"
	GetModelsSortDesignArenaEloHighToLow GetModelsSort = "design-arena-elo-high-to-low"
)

func (*GetModelsSort) IsExact

func (e *GetModelsSort) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GetModelsSort) ToPointer

func (e GetModelsSort) ToPointer() *GetModelsSort

type GetObservabilityDestinationRequest

type GetObservabilityDestinationRequest struct {
	// The destination ID (UUID).
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*GetObservabilityDestinationRequest) GetID

type GetPresetRequest

type GetPresetRequest struct {
	// URL-safe slug identifying the preset.
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
}

func (*GetPresetRequest) GetSlug

func (g *GetPresetRequest) GetSlug() string

type GetPresetVersionRequest

type GetPresetVersionRequest struct {
	// URL-safe slug identifying the preset.
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
	// Version number of the preset.
	Version string `pathParam:"style=simple,explode=false,name=version"`
}

func (*GetPresetVersionRequest) GetSlug

func (g *GetPresetVersionRequest) GetSlug() string

func (*GetPresetVersionRequest) GetVersion

func (g *GetPresetVersionRequest) GetVersion() string

type GetRankingsDailyCategory added in v0.5.13

type GetRankingsDailyCategory string

GetRankingsDailyCategory - Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.

const (
	GetRankingsDailyCategoryProgramming  GetRankingsDailyCategory = "programming"
	GetRankingsDailyCategoryRoleplay     GetRankingsDailyCategory = "roleplay"
	GetRankingsDailyCategoryMarketing    GetRankingsDailyCategory = "marketing"
	GetRankingsDailyCategoryMarketingSeo GetRankingsDailyCategory = "marketing/seo"
	GetRankingsDailyCategoryTechnology   GetRankingsDailyCategory = "technology"
	GetRankingsDailyCategoryScience      GetRankingsDailyCategory = "science"
	GetRankingsDailyCategoryTranslation  GetRankingsDailyCategory = "translation"
	GetRankingsDailyCategoryLegal        GetRankingsDailyCategory = "legal"
	GetRankingsDailyCategoryFinance      GetRankingsDailyCategory = "finance"
	GetRankingsDailyCategoryHealth       GetRankingsDailyCategory = "health"
	GetRankingsDailyCategoryTrivia       GetRankingsDailyCategory = "trivia"
	GetRankingsDailyCategoryAcademia     GetRankingsDailyCategory = "academia"
)

func (*GetRankingsDailyCategory) IsExact added in v0.5.13

func (e *GetRankingsDailyCategory) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GetRankingsDailyCategory) ToPointer added in v0.5.13

type GetRankingsDailyRequest

type GetRankingsDailyRequest struct {
	// Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
	StartDate *string `queryParam:"style=form,explode=true,name=start_date"`
	// End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
	EndDate *string `queryParam:"style=form,explode=true,name=end_date"`
	// Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.
	Period *Period `queryParam:"style=form,explode=true,name=period"`
	// Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.
	Modality *Modality `queryParam:"style=form,explode=true,name=modality"`
	// Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.
	ContextBucket *ContextBucket `queryParam:"style=form,explode=true,name=context_bucket"`
	// Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
	Category *GetRankingsDailyCategory `queryParam:"style=form,explode=true,name=category"`
	// Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
	LanguageType *LanguageType `queryParam:"style=form,explode=true,name=language_type"`
}

func (*GetRankingsDailyRequest) GetCategory added in v0.5.13

func (*GetRankingsDailyRequest) GetContextBucket added in v0.5.13

func (g *GetRankingsDailyRequest) GetContextBucket() *ContextBucket

func (*GetRankingsDailyRequest) GetEndDate

func (g *GetRankingsDailyRequest) GetEndDate() *string

func (*GetRankingsDailyRequest) GetLanguageType added in v0.5.13

func (g *GetRankingsDailyRequest) GetLanguageType() *LanguageType

func (*GetRankingsDailyRequest) GetModality added in v0.5.13

func (g *GetRankingsDailyRequest) GetModality() *Modality

func (*GetRankingsDailyRequest) GetPeriod added in v0.5.13

func (g *GetRankingsDailyRequest) GetPeriod() *Period

func (*GetRankingsDailyRequest) GetStartDate

func (g *GetRankingsDailyRequest) GetStartDate() *string

type GetScimGroupMappingRequest added in v0.7.14

type GetScimGroupMappingRequest struct {
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*GetScimGroupMappingRequest) GetID added in v0.7.14

type GetTaskClassificationsRequest

type GetTaskClassificationsRequest struct {
	// Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
	Window *Window `default:"7d" queryParam:"style=form,explode=true,name=window"`
}

func (*GetTaskClassificationsRequest) GetWindow

func (g *GetTaskClassificationsRequest) GetWindow() *Window

func (GetTaskClassificationsRequest) MarshalJSON

func (g GetTaskClassificationsRequest) MarshalJSON() ([]byte, error)

func (*GetTaskClassificationsRequest) UnmarshalJSON

func (g *GetTaskClassificationsRequest) UnmarshalJSON(data []byte) error

type GetUserActivityRequest

type GetUserActivityRequest struct {
	// Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
	Date *string `queryParam:"style=form,explode=true,name=date"`
	// Filter by API key hash (SHA-256 hex string, as returned by the keys API).
	APIKeyHash *string `queryParam:"style=form,explode=true,name=api_key_hash"`
	// Filter by org member user ID. Only applicable for organization accounts.
	UserID *string `queryParam:"style=form,explode=true,name=user_id"`
	// Set to 'workspace' to split each row per workspace and include `workspace_id` on every item. Omitted by default, in which case rows are aggregated across workspaces (by date, model, and endpoint) and `workspace_id` is not returned — preserving the historical response shape.
	GroupBy *GroupBy `queryParam:"style=form,explode=true,name=group_by"`
	// Filter by workspace ID (UUID). Returns only activity attributed to that workspace. The workspace must belong to the authenticated account.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}

func (*GetUserActivityRequest) GetAPIKeyHash

func (g *GetUserActivityRequest) GetAPIKeyHash() *string

func (*GetUserActivityRequest) GetDate

func (g *GetUserActivityRequest) GetDate() *string

func (*GetUserActivityRequest) GetGroupBy added in v0.7.19

func (g *GetUserActivityRequest) GetGroupBy() *GroupBy

func (*GetUserActivityRequest) GetUserID

func (g *GetUserActivityRequest) GetUserID() *string

func (*GetUserActivityRequest) GetWorkspaceID added in v0.7.19

func (g *GetUserActivityRequest) GetWorkspaceID() *string

type GetVideosRequest

type GetVideosRequest struct {
	JobID string `pathParam:"style=simple,explode=false,name=jobId"`
}

func (*GetVideosRequest) GetJobID

func (g *GetVideosRequest) GetJobID() string

type GetWorkspaceBudgetRequest added in v0.7.21

type GetWorkspaceBudgetRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Budget reset interval. Use "lifetime" for a one-time budget that never resets.
	Interval components.WorkspaceBudgetInterval `pathParam:"style=simple,explode=false,name=interval"`
}

func (*GetWorkspaceBudgetRequest) GetID added in v0.7.21

func (g *GetWorkspaceBudgetRequest) GetID() string

func (*GetWorkspaceBudgetRequest) GetInterval added in v0.7.21

type GetWorkspaceRequest

type GetWorkspaceRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*GetWorkspaceRequest) GetID

func (g *GetWorkspaceRequest) GetID() string

type Granularity

type Granularity struct {
	// Human-readable label
	DisplayLabel string `json:"display_label"`
	// Granularity identifier
	Name GranularityName `json:"name"`
}

func (*Granularity) GetDisplayLabel

func (g *Granularity) GetDisplayLabel() string

func (*Granularity) GetName

func (g *Granularity) GetName() GranularityName

type GranularityName

type GranularityName string

GranularityName - Granularity identifier

const (
	GranularityNameMinute GranularityName = "minute"
	GranularityNameHour   GranularityName = "hour"
	GranularityNameDay    GranularityName = "day"
	GranularityNameWeek   GranularityName = "week"
	GranularityNameMonth  GranularityName = "month"
)

func (*GranularityName) IsExact

func (e *GranularityName) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (GranularityName) ToPointer

func (e GranularityName) ToPointer() *GranularityName

type GroupBy added in v0.7.19

type GroupBy string

GroupBy - Set to 'workspace' to split each row per workspace and include `workspace_id` on every item. Omitted by default, in which case rows are aggregated across workspaces (by date, model, and endpoint) and `workspace_id` is not returned — preserving the historical response shape.

const (
	GroupByWorkspace GroupBy = "workspace"
)

func (GroupBy) ToPointer added in v0.7.19

func (e GroupBy) ToPointer() *GroupBy

func (*GroupBy) UnmarshalJSON added in v0.7.19

func (e *GroupBy) UnmarshalJSON(data []byte) error

type Headquarters

type Headquarters string

Headquarters - ISO 3166-1 Alpha-2 country code of the provider headquarters

const (
	HeadquartersAd Headquarters = "AD"
	HeadquartersAe Headquarters = "AE"
	HeadquartersAf Headquarters = "AF"
	HeadquartersAg Headquarters = "AG"
	HeadquartersAi Headquarters = "AI"
	HeadquartersAl Headquarters = "AL"
	HeadquartersAm Headquarters = "AM"
	HeadquartersAo Headquarters = "AO"
	HeadquartersAq Headquarters = "AQ"
	HeadquartersAr Headquarters = "AR"
	HeadquartersAs Headquarters = "AS"
	HeadquartersAt Headquarters = "AT"
	HeadquartersAu Headquarters = "AU"
	HeadquartersAw Headquarters = "AW"
	HeadquartersAx Headquarters = "AX"
	HeadquartersAz Headquarters = "AZ"
	HeadquartersBa Headquarters = "BA"
	HeadquartersBb Headquarters = "BB"
	HeadquartersBd Headquarters = "BD"
	HeadquartersBe Headquarters = "BE"
	HeadquartersBf Headquarters = "BF"
	HeadquartersBg Headquarters = "BG"
	HeadquartersBh Headquarters = "BH"
	HeadquartersBi Headquarters = "BI"
	HeadquartersBj Headquarters = "BJ"
	HeadquartersBl Headquarters = "BL"
	HeadquartersBm Headquarters = "BM"
	HeadquartersBn Headquarters = "BN"
	HeadquartersBo Headquarters = "BO"
	HeadquartersBq Headquarters = "BQ"
	HeadquartersBr Headquarters = "BR"
	HeadquartersBs Headquarters = "BS"
	HeadquartersBt Headquarters = "BT"
	HeadquartersBv Headquarters = "BV"
	HeadquartersBw Headquarters = "BW"
	HeadquartersBy Headquarters = "BY"
	HeadquartersBz Headquarters = "BZ"
	HeadquartersCa Headquarters = "CA"
	HeadquartersCc Headquarters = "CC"
	HeadquartersCd Headquarters = "CD"
	HeadquartersCf Headquarters = "CF"
	HeadquartersCg Headquarters = "CG"
	HeadquartersCh Headquarters = "CH"
	HeadquartersCi Headquarters = "CI"
	HeadquartersCk Headquarters = "CK"
	HeadquartersCl Headquarters = "CL"
	HeadquartersCm Headquarters = "CM"
	HeadquartersCn Headquarters = "CN"
	HeadquartersCo Headquarters = "CO"
	HeadquartersCr Headquarters = "CR"
	HeadquartersCu Headquarters = "CU"
	HeadquartersCv Headquarters = "CV"
	HeadquartersCw Headquarters = "CW"
	HeadquartersCx Headquarters = "CX"
	HeadquartersCy Headquarters = "CY"
	HeadquartersCz Headquarters = "CZ"
	HeadquartersDe Headquarters = "DE"
	HeadquartersDj Headquarters = "DJ"
	HeadquartersDk Headquarters = "DK"
	HeadquartersDm Headquarters = "DM"
	HeadquartersDo Headquarters = "DO"
	HeadquartersDz Headquarters = "DZ"
	HeadquartersEc Headquarters = "EC"
	HeadquartersEe Headquarters = "EE"
	HeadquartersEg Headquarters = "EG"
	HeadquartersEh Headquarters = "EH"
	HeadquartersEr Headquarters = "ER"
	HeadquartersEs Headquarters = "ES"
	HeadquartersEt Headquarters = "ET"
	HeadquartersFi Headquarters = "FI"
	HeadquartersFj Headquarters = "FJ"
	HeadquartersFk Headquarters = "FK"
	HeadquartersFm Headquarters = "FM"
	HeadquartersFo Headquarters = "FO"
	HeadquartersFr Headquarters = "FR"
	HeadquartersGa Headquarters = "GA"
	HeadquartersGb Headquarters = "GB"
	HeadquartersGd Headquarters = "GD"
	HeadquartersGe Headquarters = "GE"
	HeadquartersGf Headquarters = "GF"
	HeadquartersGg Headquarters = "GG"
	HeadquartersGh Headquarters = "GH"
	HeadquartersGi Headquarters = "GI"
	HeadquartersGl Headquarters = "GL"
	HeadquartersGm Headquarters = "GM"
	HeadquartersGn Headquarters = "GN"
	HeadquartersGp Headquarters = "GP"
	HeadquartersGq Headquarters = "GQ"
	HeadquartersGr Headquarters = "GR"
	HeadquartersGs Headquarters = "GS"
	HeadquartersGt Headquarters = "GT"
	HeadquartersGu Headquarters = "GU"
	HeadquartersGw Headquarters = "GW"
	HeadquartersGy Headquarters = "GY"
	HeadquartersHk Headquarters = "HK"
	HeadquartersHm Headquarters = "HM"
	HeadquartersHn Headquarters = "HN"
	HeadquartersHr Headquarters = "HR"
	HeadquartersHt Headquarters = "HT"
	HeadquartersHu Headquarters = "HU"
	HeadquartersID Headquarters = "ID"
	HeadquartersIe Headquarters = "IE"
	HeadquartersIl Headquarters = "IL"
	HeadquartersIm Headquarters = "IM"
	HeadquartersIn Headquarters = "IN"
	HeadquartersIo Headquarters = "IO"
	HeadquartersIq Headquarters = "IQ"
	HeadquartersIr Headquarters = "IR"
	HeadquartersIs Headquarters = "IS"
	HeadquartersIt Headquarters = "IT"
	HeadquartersJe Headquarters = "JE"
	HeadquartersJm Headquarters = "JM"
	HeadquartersJo Headquarters = "JO"
	HeadquartersJp Headquarters = "JP"
	HeadquartersKe Headquarters = "KE"
	HeadquartersKg Headquarters = "KG"
	HeadquartersKh Headquarters = "KH"
	HeadquartersKi Headquarters = "KI"
	HeadquartersKm Headquarters = "KM"
	HeadquartersKn Headquarters = "KN"
	HeadquartersKp Headquarters = "KP"
	HeadquartersKr Headquarters = "KR"
	HeadquartersKw Headquarters = "KW"
	HeadquartersKy Headquarters = "KY"
	HeadquartersKz Headquarters = "KZ"
	HeadquartersLa Headquarters = "LA"
	HeadquartersLb Headquarters = "LB"
	HeadquartersLc Headquarters = "LC"
	HeadquartersLi Headquarters = "LI"
	HeadquartersLk Headquarters = "LK"
	HeadquartersLr Headquarters = "LR"
	HeadquartersLs Headquarters = "LS"
	HeadquartersLt Headquarters = "LT"
	HeadquartersLu Headquarters = "LU"
	HeadquartersLv Headquarters = "LV"
	HeadquartersLy Headquarters = "LY"
	HeadquartersMa Headquarters = "MA"
	HeadquartersMc Headquarters = "MC"
	HeadquartersMd Headquarters = "MD"
	HeadquartersMe Headquarters = "ME"
	HeadquartersMf Headquarters = "MF"
	HeadquartersMg Headquarters = "MG"
	HeadquartersMh Headquarters = "MH"
	HeadquartersMk Headquarters = "MK"
	HeadquartersMl Headquarters = "ML"
	HeadquartersMm Headquarters = "MM"
	HeadquartersMn Headquarters = "MN"
	HeadquartersMo Headquarters = "MO"
	HeadquartersMp Headquarters = "MP"
	HeadquartersMq Headquarters = "MQ"
	HeadquartersMr Headquarters = "MR"
	HeadquartersMs Headquarters = "MS"
	HeadquartersMt Headquarters = "MT"
	HeadquartersMu Headquarters = "MU"
	HeadquartersMv Headquarters = "MV"
	HeadquartersMw Headquarters = "MW"
	HeadquartersMx Headquarters = "MX"
	HeadquartersMy Headquarters = "MY"
	HeadquartersMz Headquarters = "MZ"
	HeadquartersNa Headquarters = "NA"
	HeadquartersNc Headquarters = "NC"
	HeadquartersNe Headquarters = "NE"
	HeadquartersNf Headquarters = "NF"
	HeadquartersNg Headquarters = "NG"
	HeadquartersNi Headquarters = "NI"
	HeadquartersNl Headquarters = "NL"
	HeadquartersNo Headquarters = "NO"
	HeadquartersNp Headquarters = "NP"
	HeadquartersNr Headquarters = "NR"
	HeadquartersNu Headquarters = "NU"
	HeadquartersNz Headquarters = "NZ"
	HeadquartersOm Headquarters = "OM"
	HeadquartersPa Headquarters = "PA"
	HeadquartersPe Headquarters = "PE"
	HeadquartersPf Headquarters = "PF"
	HeadquartersPg Headquarters = "PG"
	HeadquartersPh Headquarters = "PH"
	HeadquartersPk Headquarters = "PK"
	HeadquartersPl Headquarters = "PL"
	HeadquartersPm Headquarters = "PM"
	HeadquartersPn Headquarters = "PN"
	HeadquartersPr Headquarters = "PR"
	HeadquartersPs Headquarters = "PS"
	HeadquartersPt Headquarters = "PT"
	HeadquartersPw Headquarters = "PW"
	HeadquartersPy Headquarters = "PY"
	HeadquartersQa Headquarters = "QA"
	HeadquartersRe Headquarters = "RE"
	HeadquartersRo Headquarters = "RO"
	HeadquartersRs Headquarters = "RS"
	HeadquartersRu Headquarters = "RU"
	HeadquartersRw Headquarters = "RW"
	HeadquartersSa Headquarters = "SA"
	HeadquartersSb Headquarters = "SB"
	HeadquartersSc Headquarters = "SC"
	HeadquartersSd Headquarters = "SD"
	HeadquartersSe Headquarters = "SE"
	HeadquartersSg Headquarters = "SG"
	HeadquartersSh Headquarters = "SH"
	HeadquartersSi Headquarters = "SI"
	HeadquartersSj Headquarters = "SJ"
	HeadquartersSk Headquarters = "SK"
	HeadquartersSl Headquarters = "SL"
	HeadquartersSm Headquarters = "SM"
	HeadquartersSn Headquarters = "SN"
	HeadquartersSo Headquarters = "SO"
	HeadquartersSr Headquarters = "SR"
	HeadquartersSs Headquarters = "SS"
	HeadquartersSt Headquarters = "ST"
	HeadquartersSv Headquarters = "SV"
	HeadquartersSx Headquarters = "SX"
	HeadquartersSy Headquarters = "SY"
	HeadquartersSz Headquarters = "SZ"
	HeadquartersTc Headquarters = "TC"
	HeadquartersTd Headquarters = "TD"
	HeadquartersTf Headquarters = "TF"
	HeadquartersTg Headquarters = "TG"
	HeadquartersTh Headquarters = "TH"
	HeadquartersTj Headquarters = "TJ"
	HeadquartersTk Headquarters = "TK"
	HeadquartersTl Headquarters = "TL"
	HeadquartersTm Headquarters = "TM"
	HeadquartersTn Headquarters = "TN"
	HeadquartersTo Headquarters = "TO"
	HeadquartersTr Headquarters = "TR"
	HeadquartersTt Headquarters = "TT"
	HeadquartersTv Headquarters = "TV"
	HeadquartersTw Headquarters = "TW"
	HeadquartersTz Headquarters = "TZ"
	HeadquartersUa Headquarters = "UA"
	HeadquartersUg Headquarters = "UG"
	HeadquartersUm Headquarters = "UM"
	HeadquartersUs Headquarters = "US"
	HeadquartersUy Headquarters = "UY"
	HeadquartersUz Headquarters = "UZ"
	HeadquartersVa Headquarters = "VA"
	HeadquartersVc Headquarters = "VC"
	HeadquartersVe Headquarters = "VE"
	HeadquartersVg Headquarters = "VG"
	HeadquartersVi Headquarters = "VI"
	HeadquartersVn Headquarters = "VN"
	HeadquartersVu Headquarters = "VU"
	HeadquartersWf Headquarters = "WF"
	HeadquartersWs Headquarters = "WS"
	HeadquartersYe Headquarters = "YE"
	HeadquartersYt Headquarters = "YT"
	HeadquartersZa Headquarters = "ZA"
	HeadquartersZm Headquarters = "ZM"
	HeadquartersZw Headquarters = "ZW"
)

func (*Headquarters) IsExact

func (e *Headquarters) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Headquarters) ToPointer

func (e Headquarters) ToPointer() *Headquarters

type ImageURL

type ImageURL struct {
	URL string `json:"url"`
}

func (*ImageURL) GetURL

func (i *ImageURL) GetURL() string

func (ImageURL) MarshalJSON

func (i ImageURL) MarshalJSON() ([]byte, error)

func (*ImageURL) UnmarshalJSON

func (i *ImageURL) UnmarshalJSON(data []byte) error

type Input

type Input struct {
	Content []Content `json:"content"`
}

func (*Input) GetContent

func (i *Input) GetContent() []Content

func (Input) MarshalJSON

func (i Input) MarshalJSON() ([]byte, error)

func (*Input) UnmarshalJSON

func (i *Input) UnmarshalJSON(data []byte) error

type InputUnion

type InputUnion struct {
	Str                  *string     `queryParam:"inline" union:"member"`
	ArrayOfStr           []string    `queryParam:"inline" union:"member"`
	ArrayOfNumber        []float64   `queryParam:"inline" union:"member"`
	ArrayOfArrayOfNumber [][]float64 `queryParam:"inline" union:"member"`
	ArrayOfInput         []Input     `queryParam:"inline" union:"member"`

	Type InputUnionType
}

InputUnion - Text, token, or multimodal input(s) to embed

func CreateInputUnionArrayOfArrayOfNumber

func CreateInputUnionArrayOfArrayOfNumber(arrayOfArrayOfNumber [][]float64) InputUnion

func CreateInputUnionArrayOfInput

func CreateInputUnionArrayOfInput(arrayOfInput []Input) InputUnion

func CreateInputUnionArrayOfNumber

func CreateInputUnionArrayOfNumber(arrayOfNumber []float64) InputUnion

func CreateInputUnionArrayOfStr

func CreateInputUnionArrayOfStr(arrayOfStr []string) InputUnion

func CreateInputUnionStr

func CreateInputUnionStr(str string) InputUnion

func (InputUnion) MarshalJSON

func (u InputUnion) MarshalJSON() ([]byte, error)

func (*InputUnion) UnmarshalJSON

func (u *InputUnion) UnmarshalJSON(data []byte) error

type InputUnionType

type InputUnionType string
const (
	InputUnionTypeStr                  InputUnionType = "str"
	InputUnionTypeArrayOfStr           InputUnionType = "arrayOfStr"
	InputUnionTypeArrayOfNumber        InputUnionType = "arrayOfNumber"
	InputUnionTypeArrayOfArrayOfNumber InputUnionType = "arrayOfArrayOfNumber"
	InputUnionTypeArrayOfInput         InputUnionType = "arrayOfInput"
)

type KeepMembers added in v0.7.14

type KeepMembers struct {
	KeepMembersEnum *KeepMembersEnum `queryParam:"inline" union:"member"`
	Boolean         *bool            `queryParam:"inline" union:"member"`

	Type KeepMembersType
}

KeepMembers - Required. Whether to keep workspace members after deleting the mapping. `false` **removes** the members this mapping granted access to; `true` deletes the mapping while leaving membership intact as manually-managed. There is deliberately no default — omitting it returns `400` so the destructive path cannot be reached by accident. Mirrors the dashboard, whose `DeleteMappingSchema.keepMembers` is likewise required.

func CreateKeepMembersBoolean added in v0.7.14

func CreateKeepMembersBoolean(boolean bool) KeepMembers

func CreateKeepMembersKeepMembersEnum added in v0.7.14

func CreateKeepMembersKeepMembersEnum(keepMembersEnum KeepMembersEnum) KeepMembers

func (KeepMembers) MarshalJSON added in v0.7.14

func (u KeepMembers) MarshalJSON() ([]byte, error)

func (*KeepMembers) UnmarshalJSON added in v0.7.14

func (u *KeepMembers) UnmarshalJSON(data []byte) error

type KeepMembersEnum added in v0.7.14

type KeepMembersEnum string
const (
	KeepMembersEnumTrue  KeepMembersEnum = "true"
	KeepMembersEnumFalse KeepMembersEnum = "false"
)

func (*KeepMembersEnum) IsExact added in v0.7.14

func (e *KeepMembersEnum) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (KeepMembersEnum) ToPointer added in v0.7.14

func (e KeepMembersEnum) ToPointer() *KeepMembersEnum

type KeepMembersType added in v0.7.14

type KeepMembersType string
const (
	KeepMembersTypeKeepMembersEnum KeepMembersType = "keep_members_enum"
	KeepMembersTypeBoolean         KeepMembersType = "boolean"
)

type LanguageType added in v0.5.13

type LanguageType string

LanguageType - Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.

const (
	LanguageTypeNatural     LanguageType = "natural"
	LanguageTypeProgramming LanguageType = "programming"
)

func (*LanguageType) IsExact added in v0.5.13

func (e *LanguageType) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (LanguageType) ToPointer added in v0.5.13

func (e LanguageType) ToPointer() *LanguageType

type ListBYOKKeysRequest

type ListBYOKKeysRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
	// Optional workspace ID to filter by. When omitted, resolves to the account’s default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
	Provider *Provider `queryParam:"style=form,explode=true,name=provider"`
}

func (*ListBYOKKeysRequest) GetLimit

func (l *ListBYOKKeysRequest) GetLimit() *int64

func (*ListBYOKKeysRequest) GetOffset

func (*ListBYOKKeysRequest) GetProvider

func (l *ListBYOKKeysRequest) GetProvider() *Provider

func (*ListBYOKKeysRequest) GetWorkspaceID

func (l *ListBYOKKeysRequest) GetWorkspaceID() *string

func (ListBYOKKeysRequest) MarshalJSON added in v0.5.18

func (l ListBYOKKeysRequest) MarshalJSON() ([]byte, error)

func (*ListBYOKKeysRequest) UnmarshalJSON added in v0.5.18

func (l *ListBYOKKeysRequest) UnmarshalJSON(data []byte) error

type ListBYOKKeysResponse

type ListBYOKKeysResponse struct {
	Result components.ListBYOKKeysResponse

	Next func() (*ListBYOKKeysResponse, error)
}

func (*ListBYOKKeysResponse) GetResult

type ListData

type ListData struct {
	// Total external BYOK usage (in USD) for the API key
	BYOKUsage float64 `json:"byok_usage"`
	// External BYOK usage (in USD) for the current UTC day
	BYOKUsageDaily float64 `json:"byok_usage_daily"`
	// External BYOK usage (in USD) for current UTC month
	BYOKUsageMonthly float64 `json:"byok_usage_monthly"`
	// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
	BYOKUsageWeekly float64 `json:"byok_usage_weekly"`
	// ISO 8601 timestamp of when the API key was created
	CreatedAt string `json:"created_at"`
	// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
	CreatorUserID *string `json:"creator_user_id"`
	// Whether the API key is disabled
	Disabled bool `json:"disabled"`
	// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Unique hash identifier for the API key
	Hash string `json:"hash"`
	// Whether to include external BYOK usage in the credit limit
	IncludeBYOKInLimit bool `json:"include_byok_in_limit"`
	// Human-readable label for the API key
	Label string `json:"label"`
	// Spending limit for the API key in USD
	Limit *float64 `json:"limit"`
	// Remaining spending limit in USD
	LimitRemaining *float64 `json:"limit_remaining"`
	// Type of limit reset for the API key
	LimitReset *string `json:"limit_reset"`
	// Name of the API key
	Name string `json:"name"`
	// ISO 8601 timestamp of when the API key was last updated
	UpdatedAt *string `json:"updated_at"`
	// Total OpenRouter credit usage (in USD) for the API key
	Usage float64 `json:"usage"`
	// OpenRouter credit usage (in USD) for the current UTC day
	UsageDaily float64 `json:"usage_daily"`
	// OpenRouter credit usage (in USD) for the current UTC month
	UsageMonthly float64 `json:"usage_monthly"`
	// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
	UsageWeekly float64 `json:"usage_weekly"`
	// The workspace ID this API key belongs to.
	WorkspaceID string `json:"workspace_id"`
}

func (*ListData) GetBYOKUsage added in v0.7.13

func (l *ListData) GetBYOKUsage() float64

func (*ListData) GetBYOKUsageDaily added in v0.7.13

func (l *ListData) GetBYOKUsageDaily() float64

func (*ListData) GetBYOKUsageMonthly added in v0.7.13

func (l *ListData) GetBYOKUsageMonthly() float64

func (*ListData) GetBYOKUsageWeekly added in v0.7.13

func (l *ListData) GetBYOKUsageWeekly() float64

func (*ListData) GetCreatedAt

func (l *ListData) GetCreatedAt() string

func (*ListData) GetCreatorUserID

func (l *ListData) GetCreatorUserID() *string

func (*ListData) GetDisabled

func (l *ListData) GetDisabled() bool

func (*ListData) GetExpiresAt

func (l *ListData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]

func (*ListData) GetHash

func (l *ListData) GetHash() string

func (*ListData) GetIncludeBYOKInLimit added in v0.7.13

func (l *ListData) GetIncludeBYOKInLimit() bool

func (*ListData) GetLabel

func (l *ListData) GetLabel() string

func (*ListData) GetLimit

func (l *ListData) GetLimit() *float64

func (*ListData) GetLimitRemaining

func (l *ListData) GetLimitRemaining() *float64

func (*ListData) GetLimitReset

func (l *ListData) GetLimitReset() *string

func (*ListData) GetName

func (l *ListData) GetName() string

func (*ListData) GetUpdatedAt

func (l *ListData) GetUpdatedAt() *string

func (*ListData) GetUsage

func (l *ListData) GetUsage() float64

func (*ListData) GetUsageDaily

func (l *ListData) GetUsageDaily() float64

func (*ListData) GetUsageMonthly

func (l *ListData) GetUsageMonthly() float64

func (*ListData) GetUsageWeekly

func (l *ListData) GetUsageWeekly() float64

func (*ListData) GetWorkspaceID

func (l *ListData) GetWorkspaceID() string

func (ListData) MarshalJSON

func (l ListData) MarshalJSON() ([]byte, error)

func (*ListData) UnmarshalJSON

func (l *ListData) UnmarshalJSON(data []byte) error

type ListEmbeddingsModelsRequest added in v0.5.18

type ListEmbeddingsModelsRequest struct {
	// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
	Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListEmbeddingsModelsRequest) GetLimit added in v0.5.18

func (l *ListEmbeddingsModelsRequest) GetLimit() *int64

func (*ListEmbeddingsModelsRequest) GetOffset added in v0.5.18

func (ListEmbeddingsModelsRequest) MarshalJSON added in v0.5.18

func (l ListEmbeddingsModelsRequest) MarshalJSON() ([]byte, error)

func (*ListEmbeddingsModelsRequest) UnmarshalJSON added in v0.5.18

func (l *ListEmbeddingsModelsRequest) UnmarshalJSON(data []byte) error

type ListEmbeddingsModelsResponse added in v0.5.18

type ListEmbeddingsModelsResponse struct {
	Result components.ModelsListResponse

	Next func() (*ListEmbeddingsModelsResponse, error)
}

func (*ListEmbeddingsModelsResponse) GetResult added in v0.5.18

type ListEndpointsRequest

type ListEndpointsRequest struct {
	// The author/organization of the model
	Author string `pathParam:"style=simple,explode=false,name=author"`
	// The model slug
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
}

func (*ListEndpointsRequest) GetAuthor

func (l *ListEndpointsRequest) GetAuthor() string

func (*ListEndpointsRequest) GetSlug

func (l *ListEndpointsRequest) GetSlug() string

type ListEndpointsResponse

type ListEndpointsResponse struct {
	// List of available endpoints for a model
	Data components.ListEndpointsResponse `json:"data"`
}

ListEndpointsResponse - Returns a list of endpoints

func (*ListEndpointsResponse) GetData

type ListEndpointsZdrResponse

type ListEndpointsZdrResponse struct {
	Data []components.PublicEndpoint `json:"data"`
}

ListEndpointsZdrResponse - Returns a list of endpoints

func (*ListEndpointsZdrResponse) GetData

type ListFilesRequest

type ListFilesRequest struct {
	// Maximum number of files to return (1–1000).
	Limit *int64 `queryParam:"style=form,explode=true,name=limit"`
	// Opaque pagination cursor from a previous response.
	Cursor *string `queryParam:"style=form,explode=true,name=cursor"`
	// Workspace to scope the request to. Defaults to the caller’s default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
	Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
	// OpenAI-style forward cursor: the id to list after.
	After *string `queryParam:"style=form,explode=true,name=after"`
	// Anthropic-style forward cursor: the id to list after.
	AfterID *string `queryParam:"style=form,explode=true,name=after_id"`
	// Anthropic-style reverse cursor. Not supported by OpenRouter storage.
	BeforeID *string `queryParam:"style=form,explode=true,name=before_id"`
	// Sort direction. Only `asc` is supported by OpenRouter storage.
	Order *Order `queryParam:"style=form,explode=true,name=order"`
}

func (*ListFilesRequest) GetAfter added in v0.7.7

func (l *ListFilesRequest) GetAfter() *string

func (*ListFilesRequest) GetAfterID added in v0.7.7

func (l *ListFilesRequest) GetAfterID() *string

func (*ListFilesRequest) GetBeforeID added in v0.7.7

func (l *ListFilesRequest) GetBeforeID() *string

func (*ListFilesRequest) GetCursor

func (l *ListFilesRequest) GetCursor() *string

func (*ListFilesRequest) GetLimit

func (l *ListFilesRequest) GetLimit() *int64

func (*ListFilesRequest) GetOrder added in v0.7.7

func (l *ListFilesRequest) GetOrder() *Order

func (*ListFilesRequest) GetProvider added in v0.7.7

func (l *ListFilesRequest) GetProvider() *components.FileProvider

func (*ListFilesRequest) GetWorkspaceID

func (l *ListFilesRequest) GetWorkspaceID() *string

type ListFilesResponse

type ListFilesResponse struct {
	Result components.FileListResponse

	Next func() (*ListFilesResponse, error)
}

func (*ListFilesResponse) GetResult

func (*ListFilesResponse) GetResultAnthropic added in v0.7.7

func (l *ListFilesResponse) GetResultAnthropic() *components.AnthropicFileList

func (*ListFilesResponse) GetResultOpenai added in v0.7.7

func (l *ListFilesResponse) GetResultOpenai() *components.OpenAIFileList

func (*ListFilesResponse) GetResultOpenrouter added in v0.7.7

func (l *ListFilesResponse) GetResultOpenrouter() *components.OpenRouterFileList

type ListGenerationContentRequest

type ListGenerationContentRequest struct {
	// The generation ID
	ID string `queryParam:"style=form,explode=true,name=id"`
}

func (*ListGenerationContentRequest) GetID

type ListGuardrailKeyAssignmentsRequest

type ListGuardrailKeyAssignmentsRequest struct {
	// The unique identifier of the guardrail
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListGuardrailKeyAssignmentsRequest) GetID

func (*ListGuardrailKeyAssignmentsRequest) GetLimit

func (*ListGuardrailKeyAssignmentsRequest) GetOffset

func (ListGuardrailKeyAssignmentsRequest) MarshalJSON added in v0.5.18

func (l ListGuardrailKeyAssignmentsRequest) MarshalJSON() ([]byte, error)

func (*ListGuardrailKeyAssignmentsRequest) UnmarshalJSON added in v0.5.18

func (l *ListGuardrailKeyAssignmentsRequest) UnmarshalJSON(data []byte) error

type ListGuardrailKeyAssignmentsResponse

type ListGuardrailKeyAssignmentsResponse struct {
	Result components.ListKeyAssignmentsResponse

	Next func() (*ListGuardrailKeyAssignmentsResponse, error)
}

func (*ListGuardrailKeyAssignmentsResponse) GetResult

type ListGuardrailMemberAssignmentsRequest

type ListGuardrailMemberAssignmentsRequest struct {
	// The unique identifier of the guardrail
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListGuardrailMemberAssignmentsRequest) GetID

func (*ListGuardrailMemberAssignmentsRequest) GetLimit

func (*ListGuardrailMemberAssignmentsRequest) GetOffset

func (ListGuardrailMemberAssignmentsRequest) MarshalJSON added in v0.5.18

func (l ListGuardrailMemberAssignmentsRequest) MarshalJSON() ([]byte, error)

func (*ListGuardrailMemberAssignmentsRequest) UnmarshalJSON added in v0.5.18

func (l *ListGuardrailMemberAssignmentsRequest) UnmarshalJSON(data []byte) error

type ListGuardrailMemberAssignmentsResponse

type ListGuardrailMemberAssignmentsResponse struct {
	Result components.ListMemberAssignmentsResponse

	Next func() (*ListGuardrailMemberAssignmentsResponse, error)
}

func (*ListGuardrailMemberAssignmentsResponse) GetResult

type ListGuardrailsRequest

type ListGuardrailsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
	// Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}

func (*ListGuardrailsRequest) GetLimit

func (l *ListGuardrailsRequest) GetLimit() *int64

func (*ListGuardrailsRequest) GetOffset

func (*ListGuardrailsRequest) GetWorkspaceID

func (l *ListGuardrailsRequest) GetWorkspaceID() *string

func (ListGuardrailsRequest) MarshalJSON added in v0.5.18

func (l ListGuardrailsRequest) MarshalJSON() ([]byte, error)

func (*ListGuardrailsRequest) UnmarshalJSON added in v0.5.18

func (l *ListGuardrailsRequest) UnmarshalJSON(data []byte) error

type ListGuardrailsResponse

type ListGuardrailsResponse struct {
	Result components.ListGuardrailsResponse

	Next func() (*ListGuardrailsResponse, error)
}

func (*ListGuardrailsResponse) GetResult

type ListImageModelEndpointsRequest

type ListImageModelEndpointsRequest struct {
	// Model author/organization
	Author string `pathParam:"style=simple,explode=false,name=author"`
	// Model slug
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
}

func (*ListImageModelEndpointsRequest) GetAuthor

func (l *ListImageModelEndpointsRequest) GetAuthor() string

func (*ListImageModelEndpointsRequest) GetSlug

type ListKeyAssignmentsRequest

type ListKeyAssignmentsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListKeyAssignmentsRequest) GetLimit

func (l *ListKeyAssignmentsRequest) GetLimit() *int64

func (*ListKeyAssignmentsRequest) GetOffset

func (ListKeyAssignmentsRequest) MarshalJSON added in v0.5.18

func (l ListKeyAssignmentsRequest) MarshalJSON() ([]byte, error)

func (*ListKeyAssignmentsRequest) UnmarshalJSON added in v0.5.18

func (l *ListKeyAssignmentsRequest) UnmarshalJSON(data []byte) error

type ListKeyAssignmentsResponse

type ListKeyAssignmentsResponse struct {
	Result components.ListKeyAssignmentsResponse

	Next func() (*ListKeyAssignmentsResponse, error)
}

func (*ListKeyAssignmentsResponse) GetResult

type ListMemberAssignmentsRequest

type ListMemberAssignmentsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListMemberAssignmentsRequest) GetLimit

func (l *ListMemberAssignmentsRequest) GetLimit() *int64

func (*ListMemberAssignmentsRequest) GetOffset

func (ListMemberAssignmentsRequest) MarshalJSON added in v0.5.18

func (l ListMemberAssignmentsRequest) MarshalJSON() ([]byte, error)

func (*ListMemberAssignmentsRequest) UnmarshalJSON added in v0.5.18

func (l *ListMemberAssignmentsRequest) UnmarshalJSON(data []byte) error

type ListMemberAssignmentsResponse

type ListMemberAssignmentsResponse struct {
	Result components.ListMemberAssignmentsResponse

	Next func() (*ListMemberAssignmentsResponse, error)
}

func (*ListMemberAssignmentsResponse) GetResult

type ListModelsCountRequest

type ListModelsCountRequest struct {
	// Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
	OutputModalities *string `queryParam:"style=form,explode=true,name=output_modalities"`
}

func (*ListModelsCountRequest) GetOutputModalities

func (l *ListModelsCountRequest) GetOutputModalities() *string

type ListModelsUserRequest added in v0.5.18

type ListModelsUserRequest struct {
	// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
	Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListModelsUserRequest) GetLimit added in v0.5.18

func (l *ListModelsUserRequest) GetLimit() *int64

func (*ListModelsUserRequest) GetOffset added in v0.5.18

func (ListModelsUserRequest) MarshalJSON added in v0.5.18

func (l ListModelsUserRequest) MarshalJSON() ([]byte, error)

func (*ListModelsUserRequest) UnmarshalJSON added in v0.5.18

func (l *ListModelsUserRequest) UnmarshalJSON(data []byte) error

type ListModelsUserResponse added in v0.5.18

type ListModelsUserResponse struct {
	Result components.ModelsListResponse

	Next func() (*ListModelsUserResponse, error)
}

func (*ListModelsUserResponse) GetResult added in v0.5.18

type ListModelsUserSecurity

type ListModelsUserSecurity struct {
	Bearer string `security:"scheme,type=http,subtype=bearer,name=Authorization,env=openrouter_bearer"`
}

func (*ListModelsUserSecurity) GetBearer

func (l *ListModelsUserSecurity) GetBearer() string

type ListObservabilityDestinationsRequest

type ListObservabilityDestinationsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
	// Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}

func (*ListObservabilityDestinationsRequest) GetLimit

func (*ListObservabilityDestinationsRequest) GetOffset

func (*ListObservabilityDestinationsRequest) GetWorkspaceID

func (l *ListObservabilityDestinationsRequest) GetWorkspaceID() *string

func (ListObservabilityDestinationsRequest) MarshalJSON added in v0.5.18

func (l ListObservabilityDestinationsRequest) MarshalJSON() ([]byte, error)

func (*ListObservabilityDestinationsRequest) UnmarshalJSON added in v0.5.18

func (l *ListObservabilityDestinationsRequest) UnmarshalJSON(data []byte) error

type ListObservabilityDestinationsResponse

type ListObservabilityDestinationsResponse struct {
	Result components.ListObservabilityDestinationsResponse

	Next func() (*ListObservabilityDestinationsResponse, error)
}

func (*ListObservabilityDestinationsResponse) GetResult

type ListOrganizationMembersData

type ListOrganizationMembersData struct {
	// Email address of the member
	Email string `json:"email"`
	// First name of the member
	FirstName *string `json:"first_name"`
	// User ID of the organization member
	ID string `json:"id"`
	// Last name of the member
	LastName *string `json:"last_name"`
	// Role of the member in the organization
	Role Role `json:"role"`
}

func (*ListOrganizationMembersData) GetEmail

func (l *ListOrganizationMembersData) GetEmail() string

func (*ListOrganizationMembersData) GetFirstName

func (l *ListOrganizationMembersData) GetFirstName() *string

func (*ListOrganizationMembersData) GetID

func (*ListOrganizationMembersData) GetLastName

func (l *ListOrganizationMembersData) GetLastName() *string

func (*ListOrganizationMembersData) GetRole

func (l *ListOrganizationMembersData) GetRole() Role

type ListOrganizationMembersRequest

type ListOrganizationMembersRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListOrganizationMembersRequest) GetLimit

func (l *ListOrganizationMembersRequest) GetLimit() *int64

func (*ListOrganizationMembersRequest) GetOffset

func (ListOrganizationMembersRequest) MarshalJSON added in v0.5.18

func (l ListOrganizationMembersRequest) MarshalJSON() ([]byte, error)

func (*ListOrganizationMembersRequest) UnmarshalJSON added in v0.5.18

func (l *ListOrganizationMembersRequest) UnmarshalJSON(data []byte) error

type ListOrganizationMembersResponse

type ListOrganizationMembersResponse struct {
	Result ListOrganizationMembersResponseBody

	Next func() (*ListOrganizationMembersResponse, error)
}

func (*ListOrganizationMembersResponse) GetResult

type ListOrganizationMembersResponseBody

type ListOrganizationMembersResponseBody struct {
	// List of organization members
	Data []ListOrganizationMembersData `json:"data"`
	// Total number of members in the organization
	TotalCount int64 `json:"total_count"`
}

ListOrganizationMembersResponseBody - List of organization members

func (*ListOrganizationMembersResponseBody) GetData

func (*ListOrganizationMembersResponseBody) GetTotalCount

func (l *ListOrganizationMembersResponseBody) GetTotalCount() int64

type ListPresetVersionsRequest

type ListPresetVersionsRequest struct {
	// URL-safe slug identifying the preset.
	Slug string `pathParam:"style=simple,explode=false,name=slug"`
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListPresetVersionsRequest) GetLimit

func (l *ListPresetVersionsRequest) GetLimit() *int64

func (*ListPresetVersionsRequest) GetOffset

func (*ListPresetVersionsRequest) GetSlug

func (l *ListPresetVersionsRequest) GetSlug() string

func (ListPresetVersionsRequest) MarshalJSON added in v0.5.18

func (l ListPresetVersionsRequest) MarshalJSON() ([]byte, error)

func (*ListPresetVersionsRequest) UnmarshalJSON added in v0.5.18

func (l *ListPresetVersionsRequest) UnmarshalJSON(data []byte) error

type ListPresetVersionsResponse

type ListPresetVersionsResponse struct {
	Result components.ListPresetVersionsResponse

	Next func() (*ListPresetVersionsResponse, error)
}

func (*ListPresetVersionsResponse) GetResult

type ListPresetsRequest

type ListPresetsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListPresetsRequest) GetLimit

func (l *ListPresetsRequest) GetLimit() *int64

func (*ListPresetsRequest) GetOffset

func (ListPresetsRequest) MarshalJSON added in v0.5.18

func (l ListPresetsRequest) MarshalJSON() ([]byte, error)

func (*ListPresetsRequest) UnmarshalJSON added in v0.5.18

func (l *ListPresetsRequest) UnmarshalJSON(data []byte) error

type ListPresetsResponse

type ListPresetsResponse struct {
	Result components.ListPresetsResponse

	Next func() (*ListPresetsResponse, error)
}

func (*ListPresetsResponse) GetResult

type ListProvidersData

type ListProvidersData struct {
	// ISO 3166-1 Alpha-2 country codes of the provider datacenter locations
	Datacenters optionalnullable.OptionalNullable[[]Datacenter] `json:"datacenters,omitzero"`
	// ISO 3166-1 Alpha-2 country code of the provider headquarters
	Headquarters optionalnullable.OptionalNullable[Headquarters] `json:"headquarters,omitzero"`
	// Display name of the provider
	Name string `json:"name"`
	// URL to the provider's privacy policy
	PrivacyPolicyURL *string `json:"privacy_policy_url"`
	// URL-friendly identifier for the provider
	Slug string `json:"slug"`
	// URL to the provider's status page
	StatusPageURL optionalnullable.OptionalNullable[string] `json:"status_page_url,omitzero"`
	// URL to the provider's terms of service
	TermsOfServiceURL optionalnullable.OptionalNullable[string] `json:"terms_of_service_url,omitzero"`
}

func (*ListProvidersData) GetDatacenters

func (*ListProvidersData) GetHeadquarters

func (*ListProvidersData) GetName

func (l *ListProvidersData) GetName() string

func (*ListProvidersData) GetPrivacyPolicyURL

func (l *ListProvidersData) GetPrivacyPolicyURL() *string

func (*ListProvidersData) GetSlug

func (l *ListProvidersData) GetSlug() string

func (*ListProvidersData) GetStatusPageURL

func (*ListProvidersData) GetTermsOfServiceURL

func (l *ListProvidersData) GetTermsOfServiceURL() optionalnullable.OptionalNullable[string]

func (ListProvidersData) MarshalJSON

func (l ListProvidersData) MarshalJSON() ([]byte, error)

func (*ListProvidersData) UnmarshalJSON

func (l *ListProvidersData) UnmarshalJSON(data []byte) error

type ListProvidersResponse

type ListProvidersResponse struct {
	Data []ListProvidersData `json:"data"`
}

ListProvidersResponse - Returns a list of providers

func (*ListProvidersResponse) GetData

type ListRequest

type ListRequest struct {
	// Whether to include disabled API keys in the response
	IncludeDisabled *bool `queryParam:"style=form,explode=true,name=include_disabled"`
	// Number of API keys to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=offset"`
	// Filter API keys by workspace ID. By default, keys in the default workspace are returned.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}

func (*ListRequest) GetIncludeDisabled

func (l *ListRequest) GetIncludeDisabled() *bool

func (*ListRequest) GetOffset

func (*ListRequest) GetWorkspaceID

func (l *ListRequest) GetWorkspaceID() *string

type ListResponse

type ListResponse struct {
	// List of API keys
	Data []ListData `json:"data"`
}

ListResponse - List of API keys

func (*ListResponse) GetData

func (l *ListResponse) GetData() []ListData

type ListScimGroupMappingsRequest added in v0.7.14

type ListScimGroupMappingsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListScimGroupMappingsRequest) GetLimit added in v0.7.14

func (l *ListScimGroupMappingsRequest) GetLimit() *int64

func (*ListScimGroupMappingsRequest) GetOffset added in v0.7.14

func (ListScimGroupMappingsRequest) MarshalJSON added in v0.7.14

func (l ListScimGroupMappingsRequest) MarshalJSON() ([]byte, error)

func (*ListScimGroupMappingsRequest) UnmarshalJSON added in v0.7.14

func (l *ListScimGroupMappingsRequest) UnmarshalJSON(data []byte) error

type ListScimGroupMappingsResponse added in v0.7.14

type ListScimGroupMappingsResponse struct {
	Result components.ListScimGroupMappingsResponse

	Next func() (*ListScimGroupMappingsResponse, error)
}

func (*ListScimGroupMappingsResponse) GetResult added in v0.7.14

type ListScimGroupsRequest added in v0.7.14

type ListScimGroupsRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListScimGroupsRequest) GetLimit added in v0.7.14

func (l *ListScimGroupsRequest) GetLimit() *int64

func (*ListScimGroupsRequest) GetOffset added in v0.7.14

func (ListScimGroupsRequest) MarshalJSON added in v0.7.14

func (l ListScimGroupsRequest) MarshalJSON() ([]byte, error)

func (*ListScimGroupsRequest) UnmarshalJSON added in v0.7.14

func (l *ListScimGroupsRequest) UnmarshalJSON(data []byte) error

type ListScimGroupsResponse added in v0.7.14

type ListScimGroupsResponse struct {
	Result components.ListScimGroupsResponse

	Next func() (*ListScimGroupsResponse, error)
}

func (*ListScimGroupsResponse) GetResult added in v0.7.14

type ListVideosContentRequest

type ListVideosContentRequest struct {
	JobID string                                   `pathParam:"style=simple,explode=false,name=jobId"`
	Index optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=index"`
}

func (*ListVideosContentRequest) GetIndex

func (*ListVideosContentRequest) GetJobID

func (l *ListVideosContentRequest) GetJobID() string

func (ListVideosContentRequest) MarshalJSON

func (l ListVideosContentRequest) MarshalJSON() ([]byte, error)

func (*ListVideosContentRequest) UnmarshalJSON

func (l *ListVideosContentRequest) UnmarshalJSON(data []byte) error

type ListWorkspaceBudgetsRequest

type ListWorkspaceBudgetsRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
}

func (*ListWorkspaceBudgetsRequest) GetID

type ListWorkspaceMembersRequest added in v0.5.11

type ListWorkspaceMembersRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListWorkspaceMembersRequest) GetID added in v0.5.11

func (*ListWorkspaceMembersRequest) GetLimit added in v0.5.11

func (l *ListWorkspaceMembersRequest) GetLimit() *int64

func (*ListWorkspaceMembersRequest) GetOffset added in v0.5.11

func (ListWorkspaceMembersRequest) MarshalJSON added in v0.5.18

func (l ListWorkspaceMembersRequest) MarshalJSON() ([]byte, error)

func (*ListWorkspaceMembersRequest) UnmarshalJSON added in v0.5.18

func (l *ListWorkspaceMembersRequest) UnmarshalJSON(data []byte) error

type ListWorkspaceMembersResponse added in v0.5.11

type ListWorkspaceMembersResponse struct {
	Result components.ListWorkspaceMembersResponse

	Next func() (*ListWorkspaceMembersResponse, error)
}

func (*ListWorkspaceMembersResponse) GetResult added in v0.5.11

type ListWorkspacesRequest

type ListWorkspacesRequest struct {
	// Number of records to skip for pagination
	Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
	// Maximum number of records to return (max 100)
	Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}

func (*ListWorkspacesRequest) GetLimit

func (l *ListWorkspacesRequest) GetLimit() *int64

func (*ListWorkspacesRequest) GetOffset

func (ListWorkspacesRequest) MarshalJSON added in v0.5.18

func (l ListWorkspacesRequest) MarshalJSON() ([]byte, error)

func (*ListWorkspacesRequest) UnmarshalJSON added in v0.5.18

func (l *ListWorkspacesRequest) UnmarshalJSON(data []byte) error

type ListWorkspacesResponse

type ListWorkspacesResponse struct {
	Result components.ListWorkspacesResponse

	Next func() (*ListWorkspacesResponse, error)
}

func (*ListWorkspacesResponse) GetResult

type Metadata

type Metadata struct {
	QueryTimeMs float64 `json:"query_time_ms"`
	RowCount    int64   `json:"row_count"`
	Truncated   bool    `json:"truncated"`
}

func (*Metadata) GetQueryTimeMs

func (m *Metadata) GetQueryTimeMs() float64

func (*Metadata) GetRowCount

func (m *Metadata) GetRowCount() int64

func (*Metadata) GetTruncated

func (m *Metadata) GetTruncated() bool

type Metric

type Metric struct {
	// How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
	DisplayFormat DisplayFormat `json:"display_format"`
	// Human-readable label
	DisplayLabel string `json:"display_label"`
	// Whether this metric is a rate/ratio (averaged, not summed)
	IsRate bool `json:"is_rate"`
	// Metric identifier used in query requests
	Name string `json:"name"`
}

func (*Metric) GetDisplayFormat

func (m *Metric) GetDisplayFormat() DisplayFormat

func (*Metric) GetDisplayLabel

func (m *Metric) GetDisplayLabel() string

func (*Metric) GetIsRate

func (m *Metric) GetIsRate() bool

func (*Metric) GetName

func (m *Metric) GetName() string

type Modality added in v0.5.13

type Modality string

Modality - Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.

const (
	ModalityText        Modality = "text"
	ModalityImage       Modality = "image"
	ModalityImageOutput Modality = "image_output"
	ModalityAudio       Modality = "audio"
	ModalityToolCalling Modality = "tool_calling"
)

func (*Modality) IsExact added in v0.5.13

func (e *Modality) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Modality) ToPointer added in v0.5.13

func (e Modality) ToPointer() *Modality

type Object

type Object string
const (
	ObjectList Object = "list"
)

func (Object) ToPointer

func (e Object) ToPointer() *Object

func (*Object) UnmarshalJSON

func (e *Object) UnmarshalJSON(data []byte) error

type ObjectEmbedding

type ObjectEmbedding string
const (
	ObjectEmbeddingEmbedding ObjectEmbedding = "embedding"
)

func (ObjectEmbedding) ToPointer

func (e ObjectEmbedding) ToPointer() *ObjectEmbedding

func (*ObjectEmbedding) UnmarshalJSON

func (e *ObjectEmbedding) UnmarshalJSON(data []byte) error

type Operator

type Operator struct {
	// Operator identifier used in filter definitions
	Name OperatorName `json:"name"`
	// Whether the operator expects a single value or an array
	ValueType ValueType `json:"value_type"`
}

func (*Operator) GetName

func (o *Operator) GetName() OperatorName

func (*Operator) GetValueType

func (o *Operator) GetValueType() ValueType

type OperatorName

type OperatorName string

OperatorName - Operator identifier used in filter definitions

const (
	OperatorNameEq    OperatorName = "eq"
	OperatorNameNeq   OperatorName = "neq"
	OperatorNameIn    OperatorName = "in"
	OperatorNameNotIn OperatorName = "not_in"
	OperatorNameGt    OperatorName = "gt"
	OperatorNameGte   OperatorName = "gte"
	OperatorNameLt    OperatorName = "lt"
	OperatorNameLte   OperatorName = "lte"
)

func (*OperatorName) IsExact

func (e *OperatorName) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (OperatorName) ToPointer

func (e OperatorName) ToPointer() *OperatorName

type Option

type Option func(*Options, ...string) error

func WithAcceptHeaderOverride

func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option

func WithOperationTimeout

func WithOperationTimeout(timeout time.Duration) Option

WithOperationTimeout allows setting the request timeout applied for an operation.

func WithRetries

func WithRetries(config retry.Config) Option

WithRetries allows customizing the default retry configuration.

func WithServerURL

func WithServerURL(serverURL string) Option

WithServerURL allows providing an alternative server URL.

func WithSetHeaders

func WithSetHeaders(hdrs map[string]string) Option

WithSetHeaders takes a map of headers that will applied to a request. If the request contains headers that are in the map then they will be overwritten.

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) Option

WithTemplatedServerURL allows providing an alternative server URL with templated parameters.

func WithURLOverride

func WithURLOverride(urlOverride string) Option

WithURLOverride allows overriding the URL.

type Options

type Options struct {
	ServerURL            *string
	Retries              *retry.Config
	Timeout              *time.Duration
	AcceptHeaderOverride *AcceptHeaderEnum
	URLOverride          *string
	SetHeaders           map[string]string
}

type Order added in v0.7.7

type Order string

Order - Sort direction. Only `asc` is supported by OpenRouter storage.

const (
	OrderAsc  Order = "asc"
	OrderDesc Order = "desc"
)

func (*Order) IsExact added in v0.7.7

func (e *Order) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Order) ToPointer added in v0.7.7

func (e Order) ToPointer() *Order

type OrderBy

type OrderBy struct {
	Direction Direction `json:"direction"`
	// Field to order by: a metric included in `metrics` (or "request_count", which may be ordered by without being requested), a requested dimension, or "date".
	Field string `json:"field"`
}

func (*OrderBy) GetDirection

func (o *OrderBy) GetDirection() Direction

func (*OrderBy) GetField

func (o *OrderBy) GetField() string

type Period added in v0.5.13

type Period string

Period - Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.

const (
	PeriodDay   Period = "day"
	PeriodWeek  Period = "week"
	PeriodMonth Period = "month"
)

func (*Period) IsExact added in v0.5.13

func (e *Period) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Period) ToPointer added in v0.5.13

func (e Period) ToPointer() *Period

type PromptTokensDetails

type PromptTokensDetails struct {
	// Number of audio tokens in the input
	AudioTokens *int64 `json:"audio_tokens,omitzero"`
	// Number of file/document tokens in the input
	FileTokens *int64 `json:"file_tokens,omitzero"`
	// Number of image tokens in the input
	ImageTokens *int64 `json:"image_tokens,omitzero"`
	// Number of text tokens in the input
	TextTokens *int64 `json:"text_tokens,omitzero"`
	// Number of video tokens in the input
	VideoTokens *int64 `json:"video_tokens,omitzero"`
}

PromptTokensDetails - Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.

func (*PromptTokensDetails) GetAudioTokens

func (p *PromptTokensDetails) GetAudioTokens() *int64

func (*PromptTokensDetails) GetFileTokens

func (p *PromptTokensDetails) GetFileTokens() *int64

func (*PromptTokensDetails) GetImageTokens

func (p *PromptTokensDetails) GetImageTokens() *int64

func (*PromptTokensDetails) GetTextTokens

func (p *PromptTokensDetails) GetTextTokens() *int64

func (*PromptTokensDetails) GetVideoTokens

func (p *PromptTokensDetails) GetVideoTokens() *int64

type Provider

type Provider string

Provider - Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).

const (
	ProviderAi21             Provider = "ai21"
	ProviderAionLabs         Provider = "aion-labs"
	ProviderAkashml          Provider = "akashml"
	ProviderAlibaba          Provider = "alibaba"
	ProviderAmazonBedrock    Provider = "amazon-bedrock"
	ProviderAmazonNova       Provider = "amazon-nova"
	ProviderAmbient          Provider = "ambient"
	ProviderAnthropic        Provider = "anthropic"
	ProviderArceeAi          Provider = "arcee-ai"
	ProviderAtlasCloud       Provider = "atlas-cloud"
	ProviderAvian            Provider = "avian"
	ProviderAzure            Provider = "azure"
	ProviderBaidu            Provider = "baidu"
	ProviderBaseten          Provider = "baseten"
	ProviderBlackForestLabs  Provider = "black-forest-labs"
	ProviderByteplus         Provider = "byteplus"
	ProviderCerebras         Provider = "cerebras"
	ProviderChutes           Provider = "chutes"
	ProviderCirrascale       Provider = "cirrascale"
	ProviderClarifai         Provider = "clarifai"
	ProviderCloudflare       Provider = "cloudflare"
	ProviderCohere           Provider = "cohere"
	ProviderCoreweave        Provider = "coreweave"
	ProviderCrusoe           Provider = "crusoe"
	ProviderDarkbloom        Provider = "darkbloom"
	ProviderDecart           Provider = "decart"
	ProviderDeepgram         Provider = "deepgram"
	ProviderDeepinfra        Provider = "deepinfra"
	ProviderDeepseek         Provider = "deepseek"
	ProviderDekallm          Provider = "dekallm"
	ProviderDigitalocean     Provider = "digitalocean"
	ProviderFeatherless      Provider = "featherless"
	ProviderFireworks        Provider = "fireworks"
	ProviderFishAudio        Provider = "fish-audio"
	ProviderFriendli         Provider = "friendli"
	ProviderGmicloud         Provider = "gmicloud"
	ProviderGoogleAiStudio   Provider = "google-ai-studio"
	ProviderGoogleVertex     Provider = "google-vertex"
	ProviderGroq             Provider = "groq"
	ProviderHeygen           Provider = "heygen"
	ProviderInception        Provider = "inception"
	ProviderInceptron        Provider = "inceptron"
	ProviderInferactVllm     Provider = "inferact-vllm"
	ProviderInferenceNet     Provider = "inference-net"
	ProviderInfermatic       Provider = "infermatic"
	ProviderInflection       Provider = "inflection"
	ProviderIoNet            Provider = "io-net"
	ProviderIonstream        Provider = "ionstream"
	ProviderKrea             Provider = "krea"
	ProviderLiquid           Provider = "liquid"
	ProviderMancer           Provider = "mancer"
	ProviderMara             Provider = "mara"
	ProviderMeta             Provider = "meta"
	ProviderMinimax          Provider = "minimax"
	ProviderMistral          Provider = "mistral"
	ProviderModal            Provider = "modal"
	ProviderModelrun         Provider = "modelrun"
	ProviderModular          Provider = "modular"
	ProviderMoonshotai       Provider = "moonshotai"
	ProviderMorph            Provider = "morph"
	ProviderNcompass         Provider = "ncompass"
	ProviderNebius           Provider = "nebius"
	ProviderNexAgi           Provider = "nex-agi"
	ProviderNextbit          Provider = "nextbit"
	ProviderNovita           Provider = "novita"
	ProviderNvidia           Provider = "nvidia"
	ProviderOpenInference    Provider = "open-inference"
	ProviderOpenai           Provider = "openai"
	ProviderParasail         Provider = "parasail"
	ProviderPerceptron       Provider = "perceptron"
	ProviderPerplexity       Provider = "perplexity"
	ProviderPhala            Provider = "phala"
	ProviderPoolside         Provider = "poolside"
	ProviderQuiver           Provider = "quiver"
	ProviderRecraft          Provider = "recraft"
	ProviderReka             Provider = "reka"
	ProviderRelace           Provider = "relace"
	ProviderRunway           Provider = "runway"
	ProviderSailResearch     Provider = "sail-research"
	ProviderSakana           Provider = "sakana"
	ProviderSakanaAi         Provider = "sakana-ai"
	ProviderSambanova        Provider = "sambanova"
	ProviderSeed             Provider = "seed"
	ProviderSiliconflow      Provider = "siliconflow"
	ProviderSourceful        Provider = "sourceful"
	ProviderStepfun          Provider = "stepfun"
	ProviderStreamlake       Provider = "streamlake"
	ProviderSwitchpoint      Provider = "switchpoint"
	ProviderTencent          Provider = "tencent"
	ProviderTenstorrent      Provider = "tenstorrent"
	ProviderThinkingmachines Provider = "thinkingmachines"
	ProviderTogether         Provider = "together"
	ProviderUpstage          Provider = "upstage"
	ProviderVenice           Provider = "venice"
	ProviderWafer            Provider = "wafer"
	ProviderWandb            Provider = "wandb"
	ProviderWandbLegacy      Provider = "wandb-legacy"
	ProviderXai              Provider = "xai"
	ProviderXiaomi           Provider = "xiaomi"
	ProviderZAi              Provider = "z-ai"
)

func (*Provider) IsExact

func (e *Provider) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Provider) ToPointer

func (e Provider) ToPointer() *Provider

type QueryAnalyticsData1

type QueryAnalyticsData1 struct {
}

QueryAnalyticsData1 - A row of analytics data with metric/dimension values

type QueryAnalyticsData2

type QueryAnalyticsData2 struct {
	CachedAt *float64              `json:"cachedAt,omitzero"`
	Data     []QueryAnalyticsData1 `json:"data"`
	Metadata Metadata              `json:"metadata"`
	// Warnings about filter resolution issues (e.g. unresolvable api_key_id hashes). The query still runs normally; these inform the caller that some filter values could not be resolved.
	Warnings []string `json:"warnings,omitzero"`
}

func (*QueryAnalyticsData2) GetCachedAt

func (q *QueryAnalyticsData2) GetCachedAt() *float64

func (*QueryAnalyticsData2) GetData

func (*QueryAnalyticsData2) GetMetadata

func (q *QueryAnalyticsData2) GetMetadata() Metadata

func (*QueryAnalyticsData2) GetWarnings

func (q *QueryAnalyticsData2) GetWarnings() []string

func (QueryAnalyticsData2) MarshalJSON

func (q QueryAnalyticsData2) MarshalJSON() ([]byte, error)

func (*QueryAnalyticsData2) UnmarshalJSON

func (q *QueryAnalyticsData2) UnmarshalJSON(data []byte) error

type QueryAnalyticsRequest

type QueryAnalyticsRequest struct {
	// Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.
	ClassifierDimensions *ClassifierDimensions `json:"classifier_dimensions,omitzero"`
	// Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.
	ClassifierFilters *ClassifierFilters `json:"classifier_filters,omitzero"`
	Dimensions        []string           `json:"dimensions,omitzero"`
	Filters           []Filter           `json:"filters,omitzero"`
	// Time granularity
	Granularity *string `json:"granularity,omitzero"`
	// Maximum rows per distinct combination of dimensions. When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.
	GroupLimit *int64 `json:"group_limit,omitzero"`
	// Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
	Limit     *int64     `json:"limit,omitzero"`
	Metrics   []string   `json:"metrics"`
	OrderBy   *OrderBy   `json:"order_by,omitzero"`
	TimeRange *TimeRange `json:"time_range,omitzero"`
}

func (*QueryAnalyticsRequest) GetClassifierDimensions added in v0.5.14

func (q *QueryAnalyticsRequest) GetClassifierDimensions() *ClassifierDimensions

func (*QueryAnalyticsRequest) GetClassifierFilters added in v0.5.14

func (q *QueryAnalyticsRequest) GetClassifierFilters() *ClassifierFilters

func (*QueryAnalyticsRequest) GetDimensions

func (q *QueryAnalyticsRequest) GetDimensions() []string

func (*QueryAnalyticsRequest) GetFilters

func (q *QueryAnalyticsRequest) GetFilters() []Filter

func (*QueryAnalyticsRequest) GetGranularity

func (q *QueryAnalyticsRequest) GetGranularity() *string

func (*QueryAnalyticsRequest) GetGroupLimit

func (q *QueryAnalyticsRequest) GetGroupLimit() *int64

func (*QueryAnalyticsRequest) GetLimit

func (q *QueryAnalyticsRequest) GetLimit() *int64

func (*QueryAnalyticsRequest) GetMetrics

func (q *QueryAnalyticsRequest) GetMetrics() []string

func (*QueryAnalyticsRequest) GetOrderBy

func (q *QueryAnalyticsRequest) GetOrderBy() *OrderBy

func (*QueryAnalyticsRequest) GetTimeRange

func (q *QueryAnalyticsRequest) GetTimeRange() *TimeRange

func (QueryAnalyticsRequest) MarshalJSON

func (q QueryAnalyticsRequest) MarshalJSON() ([]byte, error)

func (*QueryAnalyticsRequest) UnmarshalJSON

func (q *QueryAnalyticsRequest) UnmarshalJSON(data []byte) error

type QueryAnalyticsResponse

type QueryAnalyticsResponse struct {
	Data QueryAnalyticsData2 `json:"data"`
}

QueryAnalyticsResponse - Analytics query results

func (*QueryAnalyticsResponse) GetData

type RateLimit deprecated

type RateLimit struct {
	// Rate limit interval
	Interval string `json:"interval"`
	// Note about the rate limit
	Note string `json:"note"`
	// Number of requests allowed per interval
	Requests int64 `json:"requests"`
}

RateLimit - Legacy rate limit information about a key. Will always return -1.

Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.

func (*RateLimit) GetInterval

func (r *RateLimit) GetInterval() string

func (*RateLimit) GetNote

func (r *RateLimit) GetNote() string

func (*RateLimit) GetRequests

func (r *RateLimit) GetRequests() int64

type Region

type Region string

Region - Filter to models with endpoints in the given data region. Currently only "eu" is supported.

const (
	RegionEu Region = "eu"
)

func (Region) ToPointer

func (e Region) ToPointer() *Region

func (*Region) UnmarshalJSON

func (e *Region) UnmarshalJSON(data []byte) error

type ResponseFormat added in v0.5.13

type ResponseFormat string

ResponseFormat - The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).

const (
	ResponseFormatJSON        ResponseFormat = "json"
	ResponseFormatVerboseJSON ResponseFormat = "verbose_json"
)

func (*ResponseFormat) IsExact added in v0.5.13

func (e *ResponseFormat) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (ResponseFormat) ToPointer added in v0.5.13

func (e ResponseFormat) ToPointer() *ResponseFormat

type Result

type Result struct {
	// The document object echoing the original input (text and/or image)
	Document DocumentResponse `json:"document"`
	// Index of the document in the original input list
	Index int64 `json:"index"`
	// Relevance score of the document to the query
	RelevanceScore float64 `json:"relevance_score"`
}

Result - A single rerank result

func (*Result) GetDocument

func (r *Result) GetDocument() DocumentResponse

func (*Result) GetIndex

func (r *Result) GetIndex() int64

func (*Result) GetRelevanceScore

func (r *Result) GetRelevanceScore() float64

type Role

type Role string

Role of the member in the organization

const (
	RoleOrgAdmin  Role = "org:admin"
	RoleOrgMember Role = "org:member"
)

func (*Role) IsExact

func (e *Role) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Role) ToPointer

func (e Role) ToPointer() *Role

type SendChatCompletionRequestRequest

type SendChatCompletionRequestRequest struct {
	// Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
	XOpenRouterMetadata *components.MetadataLevel `header:"style=simple,explode=false,name=X-OpenRouter-Metadata"`
	ChatRequest         components.ChatRequest    `request:"mediaType=application/json"`
}

func (*SendChatCompletionRequestRequest) GetChatRequest

func (*SendChatCompletionRequestRequest) GetXOpenRouterMetadata

func (s *SendChatCompletionRequestRequest) GetXOpenRouterMetadata() *components.MetadataLevel

type SendChatCompletionRequestResponse

type SendChatCompletionRequestResponse struct {
	ChatResult  *components.ChatResult                                `queryParam:"inline" union:"member"`
	EventStream *stream.EventStream[components.ChatStreamingResponse] `queryParam:"inline" union:"member"`

	Type SendChatCompletionRequestResponseType
}

func CreateSendChatCompletionRequestResponseChatResult

func CreateSendChatCompletionRequestResponseChatResult(chatResult components.ChatResult) SendChatCompletionRequestResponse

func (SendChatCompletionRequestResponse) MarshalJSON

func (u SendChatCompletionRequestResponse) MarshalJSON() ([]byte, error)

func (*SendChatCompletionRequestResponse) UnmarshalJSON

func (u *SendChatCompletionRequestResponse) UnmarshalJSON(data []byte) error

type SendChatCompletionRequestResponseType

type SendChatCompletionRequestResponseType string
const (
	SendChatCompletionRequestResponseTypeChatResult  SendChatCompletionRequestResponseType = "ChatResult"
	SendChatCompletionRequestResponseTypeEventStream SendChatCompletionRequestResponseType = "event-stream"
)

type Source

type Source string

Source - Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.

const (
	SourceArtificialAnalysis Source = "artificial-analysis"
	SourceDesignArena        Source = "design-arena"
	SourceOpenrouter         Source = "openrouter"
)

func (*Source) IsExact

func (e *Source) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Source) ToPointer

func (e Source) ToPointer() *Source

type Subcategory

type Subcategory string

Subcategory - Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.

const (
	SubcategoryCliAgent         Subcategory = "cli-agent"
	SubcategoryIdeExtension     Subcategory = "ide-extension"
	SubcategoryCloudAgent       Subcategory = "cloud-agent"
	SubcategoryProgrammingApp   Subcategory = "programming-app"
	SubcategoryNativeAppBuilder Subcategory = "native-app-builder"
	SubcategoryCreativeWriting  Subcategory = "creative-writing"
	SubcategoryVideoGen         Subcategory = "video-gen"
	SubcategoryImageGen         Subcategory = "image-gen"
	SubcategoryAudioGen         Subcategory = "audio-gen"
	SubcategoryRoleplay         Subcategory = "roleplay"
	SubcategoryGame             Subcategory = "game"
	SubcategoryWritingAssistant Subcategory = "writing-assistant"
	SubcategoryGeneralChat      Subcategory = "general-chat"
	SubcategoryPersonalAgent    Subcategory = "personal-agent"
	SubcategoryLegal            Subcategory = "legal"
)

func (*Subcategory) IsExact

func (e *Subcategory) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (Subcategory) ToPointer

func (e Subcategory) ToPointer() *Subcategory

type TaskType

type TaskType string

TaskType - Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.

const (
	TaskTypeCoding       TaskType = "coding"
	TaskTypeIntelligence TaskType = "intelligence"
	TaskTypeAgentic      TaskType = "agentic"
)

func (*TaskType) IsExact

func (e *TaskType) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (TaskType) ToPointer

func (e TaskType) ToPointer() *TaskType

type TimeRange

type TimeRange struct {
	End   time.Time `json:"end"`
	Start time.Time `json:"start"`
}

func (*TimeRange) GetEnd

func (t *TimeRange) GetEnd() time.Time

func (*TimeRange) GetStart

func (t *TimeRange) GetStart() time.Time

func (TimeRange) MarshalJSON

func (t TimeRange) MarshalJSON() ([]byte, error)

func (*TimeRange) UnmarshalJSON

func (t *TimeRange) UnmarshalJSON(data []byte) error

type TimestampGranularities added in v0.5.13

type TimestampGranularities string
const (
	TimestampGranularitiesWord    TimestampGranularities = "word"
	TimestampGranularitiesSegment TimestampGranularities = "segment"
)

func (*TimestampGranularities) IsExact added in v0.5.13

func (e *TimestampGranularities) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (TimestampGranularities) ToPointer added in v0.5.13

type TypeImageURL

type TypeImageURL string
const (
	TypeImageURLImageURL TypeImageURL = "image_url"
)

func (TypeImageURL) ToPointer

func (e TypeImageURL) ToPointer() *TypeImageURL

func (*TypeImageURL) UnmarshalJSON

func (e *TypeImageURL) UnmarshalJSON(data []byte) error

type TypeText

type TypeText string
const (
	TypeTextText TypeText = "text"
)

func (TypeText) ToPointer

func (e TypeText) ToPointer() *TypeText

func (*TypeText) UnmarshalJSON

func (e *TypeText) UnmarshalJSON(data []byte) error

type UpdateBYOKKeyRequest

type UpdateBYOKKeyRequest struct {
	// The BYOK credential ID (UUID).
	ID                   string                          `pathParam:"style=simple,explode=false,name=id"`
	UpdateBYOKKeyRequest components.UpdateBYOKKeyRequest `request:"mediaType=application/json"`
}

func (*UpdateBYOKKeyRequest) GetID

func (u *UpdateBYOKKeyRequest) GetID() string

func (*UpdateBYOKKeyRequest) GetUpdateBYOKKeyRequest

func (u *UpdateBYOKKeyRequest) GetUpdateBYOKKeyRequest() components.UpdateBYOKKeyRequest

type UpdateGuardrailRequest

type UpdateGuardrailRequest struct {
	// The unique identifier of the guardrail to update
	ID                     string                            `pathParam:"style=simple,explode=false,name=id"`
	UpdateGuardrailRequest components.UpdateGuardrailRequest `request:"mediaType=application/json"`
}

func (*UpdateGuardrailRequest) GetID

func (u *UpdateGuardrailRequest) GetID() string

func (*UpdateGuardrailRequest) GetUpdateGuardrailRequest

func (u *UpdateGuardrailRequest) GetUpdateGuardrailRequest() components.UpdateGuardrailRequest

type UpdateKeysData

type UpdateKeysData struct {
	// Total external BYOK usage (in USD) for the API key
	BYOKUsage float64 `json:"byok_usage"`
	// External BYOK usage (in USD) for the current UTC day
	BYOKUsageDaily float64 `json:"byok_usage_daily"`
	// External BYOK usage (in USD) for current UTC month
	BYOKUsageMonthly float64 `json:"byok_usage_monthly"`
	// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
	BYOKUsageWeekly float64 `json:"byok_usage_weekly"`
	// ISO 8601 timestamp of when the API key was created
	CreatedAt string `json:"created_at"`
	// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
	CreatorUserID *string `json:"creator_user_id"`
	// Whether the API key is disabled
	Disabled bool `json:"disabled"`
	// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
	ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
	// Unique hash identifier for the API key
	Hash string `json:"hash"`
	// Whether to include external BYOK usage in the credit limit
	IncludeBYOKInLimit bool `json:"include_byok_in_limit"`
	// Human-readable label for the API key
	Label string `json:"label"`
	// Spending limit for the API key in USD
	Limit *float64 `json:"limit"`
	// Remaining spending limit in USD
	LimitRemaining *float64 `json:"limit_remaining"`
	// Type of limit reset for the API key
	LimitReset *string `json:"limit_reset"`
	// Name of the API key
	Name string `json:"name"`
	// ISO 8601 timestamp of when the API key was last updated
	UpdatedAt *string `json:"updated_at"`
	// Total OpenRouter credit usage (in USD) for the API key
	Usage float64 `json:"usage"`
	// OpenRouter credit usage (in USD) for the current UTC day
	UsageDaily float64 `json:"usage_daily"`
	// OpenRouter credit usage (in USD) for the current UTC month
	UsageMonthly float64 `json:"usage_monthly"`
	// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
	UsageWeekly float64 `json:"usage_weekly"`
	// The workspace ID this API key belongs to.
	WorkspaceID string `json:"workspace_id"`
}

UpdateKeysData - The updated API key information

func (*UpdateKeysData) GetBYOKUsage added in v0.7.13

func (u *UpdateKeysData) GetBYOKUsage() float64

func (*UpdateKeysData) GetBYOKUsageDaily added in v0.7.13

func (u *UpdateKeysData) GetBYOKUsageDaily() float64

func (*UpdateKeysData) GetBYOKUsageMonthly added in v0.7.13

func (u *UpdateKeysData) GetBYOKUsageMonthly() float64

func (*UpdateKeysData) GetBYOKUsageWeekly added in v0.7.13

func (u *UpdateKeysData) GetBYOKUsageWeekly() float64

func (*UpdateKeysData) GetCreatedAt

func (u *UpdateKeysData) GetCreatedAt() string

func (*UpdateKeysData) GetCreatorUserID

func (u *UpdateKeysData) GetCreatorUserID() *string

func (*UpdateKeysData) GetDisabled

func (u *UpdateKeysData) GetDisabled() bool

func (*UpdateKeysData) GetExpiresAt

func (*UpdateKeysData) GetHash

func (u *UpdateKeysData) GetHash() string

func (*UpdateKeysData) GetIncludeBYOKInLimit added in v0.7.13

func (u *UpdateKeysData) GetIncludeBYOKInLimit() bool

func (*UpdateKeysData) GetLabel

func (u *UpdateKeysData) GetLabel() string

func (*UpdateKeysData) GetLimit

func (u *UpdateKeysData) GetLimit() *float64

func (*UpdateKeysData) GetLimitRemaining

func (u *UpdateKeysData) GetLimitRemaining() *float64

func (*UpdateKeysData) GetLimitReset

func (u *UpdateKeysData) GetLimitReset() *string

func (*UpdateKeysData) GetName

func (u *UpdateKeysData) GetName() string

func (*UpdateKeysData) GetUpdatedAt

func (u *UpdateKeysData) GetUpdatedAt() *string

func (*UpdateKeysData) GetUsage

func (u *UpdateKeysData) GetUsage() float64

func (*UpdateKeysData) GetUsageDaily

func (u *UpdateKeysData) GetUsageDaily() float64

func (*UpdateKeysData) GetUsageMonthly

func (u *UpdateKeysData) GetUsageMonthly() float64

func (*UpdateKeysData) GetUsageWeekly

func (u *UpdateKeysData) GetUsageWeekly() float64

func (*UpdateKeysData) GetWorkspaceID

func (u *UpdateKeysData) GetWorkspaceID() string

func (UpdateKeysData) MarshalJSON

func (u UpdateKeysData) MarshalJSON() ([]byte, error)

func (*UpdateKeysData) UnmarshalJSON

func (u *UpdateKeysData) UnmarshalJSON(data []byte) error

type UpdateKeysLimitReset

type UpdateKeysLimitReset string

UpdateKeysLimitReset - New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.

const (
	UpdateKeysLimitResetDaily   UpdateKeysLimitReset = "daily"
	UpdateKeysLimitResetWeekly  UpdateKeysLimitReset = "weekly"
	UpdateKeysLimitResetMonthly UpdateKeysLimitReset = "monthly"
)

func (*UpdateKeysLimitReset) IsExact

func (e *UpdateKeysLimitReset) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (UpdateKeysLimitReset) ToPointer

type UpdateKeysRequest

type UpdateKeysRequest struct {
	// The hash identifier of the API key to update
	Hash        string                `pathParam:"style=simple,explode=false,name=hash"`
	RequestBody UpdateKeysRequestBody `request:"mediaType=application/json"`
}

func (*UpdateKeysRequest) GetHash

func (u *UpdateKeysRequest) GetHash() string

func (*UpdateKeysRequest) GetRequestBody

func (u *UpdateKeysRequest) GetRequestBody() UpdateKeysRequestBody

type UpdateKeysRequestBody

type UpdateKeysRequestBody struct {
	// Whether to disable the API key
	Disabled *bool `json:"disabled,omitzero"`
	// Whether to include BYOK usage in the limit
	IncludeBYOKInLimit *bool `json:"include_byok_in_limit,omitzero"`
	// New spending limit for the API key in USD
	Limit optionalnullable.OptionalNullable[float64] `json:"limit,omitzero"`
	// New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
	LimitReset optionalnullable.OptionalNullable[UpdateKeysLimitReset] `json:"limit_reset,omitzero"`
	// New name for the API key
	Name *string `json:"name,omitzero"`
}

func (*UpdateKeysRequestBody) GetDisabled

func (u *UpdateKeysRequestBody) GetDisabled() *bool

func (*UpdateKeysRequestBody) GetIncludeBYOKInLimit added in v0.7.13

func (u *UpdateKeysRequestBody) GetIncludeBYOKInLimit() *bool

func (*UpdateKeysRequestBody) GetLimit

func (*UpdateKeysRequestBody) GetLimitReset

func (*UpdateKeysRequestBody) GetName

func (u *UpdateKeysRequestBody) GetName() *string

type UpdateKeysResponse

type UpdateKeysResponse struct {
	// The updated API key information
	Data UpdateKeysData `json:"data"`
}

UpdateKeysResponse - API key updated successfully

func (*UpdateKeysResponse) GetData

func (u *UpdateKeysResponse) GetData() UpdateKeysData

type UpdateObservabilityDestinationRequest

type UpdateObservabilityDestinationRequest struct {
	// The destination ID (UUID).
	ID                                    string                                           `pathParam:"style=simple,explode=false,name=id"`
	UpdateObservabilityDestinationRequest components.UpdateObservabilityDestinationRequest `request:"mediaType=application/json"`
}

func (*UpdateObservabilityDestinationRequest) GetID

func (*UpdateObservabilityDestinationRequest) GetUpdateObservabilityDestinationRequest

func (u *UpdateObservabilityDestinationRequest) GetUpdateObservabilityDestinationRequest() components.UpdateObservabilityDestinationRequest

type UpdateScimGroupMappingRequest added in v0.7.14

type UpdateScimGroupMappingRequest struct {
	ID                            string                                   `pathParam:"style=simple,explode=false,name=id"`
	UpdateScimGroupMappingRequest components.UpdateScimGroupMappingRequest `request:"mediaType=application/json"`
}

func (*UpdateScimGroupMappingRequest) GetID added in v0.7.14

func (*UpdateScimGroupMappingRequest) GetUpdateScimGroupMappingRequest added in v0.7.14

func (u *UpdateScimGroupMappingRequest) GetUpdateScimGroupMappingRequest() components.UpdateScimGroupMappingRequest

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	// The workspace ID (UUID) or slug
	ID                     string                            `pathParam:"style=simple,explode=false,name=id"`
	UpdateWorkspaceRequest components.UpdateWorkspaceRequest `request:"mediaType=application/json"`
}

func (*UpdateWorkspaceRequest) GetID

func (u *UpdateWorkspaceRequest) GetID() string

func (*UpdateWorkspaceRequest) GetUpdateWorkspaceRequest

func (u *UpdateWorkspaceRequest) GetUpdateWorkspaceRequest() components.UpdateWorkspaceRequest

type UploadFileFile added in v0.5.13

type UploadFileFile struct {
	FileName string `multipartForm:"name=fileName"`
	// This field accepts []byte data or io.Reader implementations, such as *os.File.
	Content any `multipartForm:"content"`
}

func (*UploadFileFile) GetContent added in v0.5.13

func (u *UploadFileFile) GetContent() any

func (*UploadFileFile) GetFileName added in v0.5.13

func (u *UploadFileFile) GetFileName() string

type UploadFileRequest

type UploadFileRequest struct {
	// Workspace to scope the request to. Defaults to the caller’s default workspace.
	WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
	// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
	Provider    *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
	RequestBody UploadFileRequestBody    `request:"mediaType=multipart/form-data"`
}

func (*UploadFileRequest) GetProvider added in v0.7.7

func (u *UploadFileRequest) GetProvider() *components.FileProvider

func (*UploadFileRequest) GetRequestBody

func (u *UploadFileRequest) GetRequestBody() UploadFileRequestBody

func (*UploadFileRequest) GetWorkspaceID

func (u *UploadFileRequest) GetWorkspaceID() *string

type UploadFileRequestBody

type UploadFileRequestBody struct {
	File UploadFileFile `multipartForm:"file,name=file"`
}

func (*UploadFileRequestBody) GetFile

type UpsertWorkspaceBudgetRequest

type UpsertWorkspaceBudgetRequest struct {
	// The workspace ID (UUID) or slug
	ID string `pathParam:"style=simple,explode=false,name=id"`
	// Budget reset interval. Use "lifetime" for a one-time budget that never resets.
	Interval                     components.WorkspaceBudgetInterval      `pathParam:"style=simple,explode=false,name=interval"`
	UpsertWorkspaceBudgetRequest components.UpsertWorkspaceBudgetRequest `request:"mediaType=application/json"`
}

func (*UpsertWorkspaceBudgetRequest) GetID

func (*UpsertWorkspaceBudgetRequest) GetInterval

func (*UpsertWorkspaceBudgetRequest) GetUpsertWorkspaceBudgetRequest

func (u *UpsertWorkspaceBudgetRequest) GetUpsertWorkspaceBudgetRequest() components.UpsertWorkspaceBudgetRequest

type UsageLimitType

type UsageLimitType string

UsageLimitType - Optional credit limit reset interval. When set, the credit limit resets on this interval.

const (
	UsageLimitTypeDaily   UsageLimitType = "daily"
	UsageLimitTypeWeekly  UsageLimitType = "weekly"
	UsageLimitTypeMonthly UsageLimitType = "monthly"
)

func (*UsageLimitType) IsExact

func (e *UsageLimitType) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (UsageLimitType) ToPointer

func (e UsageLimitType) ToPointer() *UsageLimitType

type Value1

type Value1 struct {
	Str           *string  `queryParam:"inline" union:"member"`
	Number        *float64 `queryParam:"inline" union:"member"`
	ArrayOfValue2 []Value2 `queryParam:"inline" union:"member"`

	Type Value1Type
}

Value1 - Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` — workspace UUID, not the workspace name (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `app` — numeric app ID, not the app title; `model` — permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.

func CreateValue1ArrayOfValue2

func CreateValue1ArrayOfValue2(arrayOfValue2 []Value2) Value1

func CreateValue1Number

func CreateValue1Number(number float64) Value1

func CreateValue1Str

func CreateValue1Str(str string) Value1

func (Value1) MarshalJSON

func (u Value1) MarshalJSON() ([]byte, error)

func (*Value1) UnmarshalJSON

func (u *Value1) UnmarshalJSON(data []byte) error

type Value1Type

type Value1Type string
const (
	Value1TypeStr           Value1Type = "str"
	Value1TypeNumber        Value1Type = "number"
	Value1TypeArrayOfValue2 Value1Type = "arrayOfValue2"
)

type Value2

type Value2 struct {
	Str    *string  `queryParam:"inline" union:"member"`
	Number *float64 `queryParam:"inline" union:"member"`

	Type Value2Type
}

func CreateValue2Number

func CreateValue2Number(number float64) Value2

func CreateValue2Str

func CreateValue2Str(str string) Value2

func (Value2) MarshalJSON

func (u Value2) MarshalJSON() ([]byte, error)

func (*Value2) UnmarshalJSON

func (u *Value2) UnmarshalJSON(data []byte) error

type Value2Type

type Value2Type string
const (
	Value2TypeStr    Value2Type = "str"
	Value2TypeNumber Value2Type = "number"
)

type ValueClassifierFilters added in v0.5.14

type ValueClassifierFilters struct {
	Str    *string  `queryParam:"inline" union:"member"`
	Number *float64 `queryParam:"inline" union:"member"`

	Type ValueClassifierFiltersType
}

func CreateValueClassifierFiltersNumber added in v0.5.14

func CreateValueClassifierFiltersNumber(number float64) ValueClassifierFilters

func CreateValueClassifierFiltersStr added in v0.5.14

func CreateValueClassifierFiltersStr(str string) ValueClassifierFilters

func (ValueClassifierFilters) MarshalJSON added in v0.5.14

func (u ValueClassifierFilters) MarshalJSON() ([]byte, error)

func (*ValueClassifierFilters) UnmarshalJSON added in v0.5.14

func (u *ValueClassifierFilters) UnmarshalJSON(data []byte) error

type ValueClassifierFiltersType added in v0.5.14

type ValueClassifierFiltersType string
const (
	ValueClassifierFiltersTypeStr    ValueClassifierFiltersType = "str"
	ValueClassifierFiltersTypeNumber ValueClassifierFiltersType = "number"
)

type ValueType

type ValueType string

ValueType - Whether the operator expects a single value or an array

const (
	ValueTypeScalar ValueType = "scalar"
	ValueTypeArray  ValueType = "array"
)

func (*ValueType) IsExact

func (e *ValueType) IsExact() bool

IsExact returns true if the value matches a known enum value, false otherwise.

func (ValueType) ToPointer

func (e ValueType) ToPointer() *ValueType

type Window

type Window string

Window - Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.

const (
	WindowSevend Window = "7d"
)

func (Window) ToPointer

func (e Window) ToPointer() *Window

func (*Window) UnmarshalJSON

func (e *Window) UnmarshalJSON(data []byte) error

type Zdr

type Zdr string

Zdr - When set to "true", return only models with zero data retention endpoints.

const (
	ZdrTrue Zdr = "true"
)

func (Zdr) ToPointer

func (e Zdr) ToPointer() *Zdr

func (*Zdr) UnmarshalJSON

func (e *Zdr) UnmarshalJSON(data []byte) error

Source Files

Jump to

Keyboard shortcuts

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