{"modulePath":"github.com/runware/runware-cli","version":"v1.3.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Constants\n\n```go\nconst (\n\tMediaOperationUpload = \"upload\"\n\tMediaOperationDelete = \"delete\"\n)\n```\nMedia storage operations, passed to Client.MediaStorage.\n\n## Variables\n\n```go\nvar ErrModelRequired = errors.New(\"model is required\")\n```\nErrModelRequired is returned by Run when the model argument is empty.\n\n```go\nvar ErrModelUploadTransport = errors.New(\"model upload requires the WebSocket transport; rerun with --transport ws\")\n```\nErrModelUploadTransport is returned by ModelUpload when the transport cannot stream pipeline status frames (modelUpload statuses are not available via getResponse polling, so the HTTP transport cannot follow the upload).\n\n```go\nvar ErrModelUploadViaRun = errors.New(\"modelUpload is not supported by 'run'; use 'runware model upload' instead\")\n```\nErrModelUploadViaRun is returned by Run when the resolved task type is modelUpload, which must go through 'runware model upload'.\n\n## Types\n\n```go\ntype APIKeyInfo struct {\n\tName        string    `json:\"name\"`\n\tAPIKey      string    `json:\"apiKey\"`\n\tDescription string    `json:\"description,omitempty\"`\n\tEnabled     bool      `json:\"enabled\"`\n\tCreatedAt   time.Time `json:\"createdAt\"`\n\tLastUsedAt  time.Time `json:\"lastUsedAt,omitzero\" yaml:\"lastusedat,omitempty\"`\n\tRequests    int       `json:\"requests,omitempty\"`\n}\n```\nAPIKeyInfo describes a single API key on the account.\n\n```go\ntype AccountManagementRequest struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tOperation string    `json:\"operation\"`\n}\n```\nAccountManagementRequest is the request payload for the accountManagement task.\n\n```go\ntype AccountResult struct {\n\tTaskType         TaskType     `json:\"taskType\"`\n\tTaskUUID         uuid.UUID    `json:\"taskUUID\"`\n\tOrganizationUUID uuid.UUID    `json:\"organizationUUID\"`\n\tOrganizationName string       `json:\"organizationName\"`\n\tAIRSource        string       `json:\"AIRSource,omitempty\"`\n\tBalance          float64      `json:\"balance\"`\n\tTeam             []TeamMember `json:\"team,omitempty\"`\n\tAPIKeys          []APIKeyInfo `json:\"apiKeys,omitempty\"`\n\tUsage            AccountUsage `json:\"usage\"`\n}\n```\nAccountResult is the response from accountManagement getDetails.\n\n```go\ntype AccountUsage struct {\n\tTotal      UsagePeriod `json:\"total\"`\n\tToday      UsagePeriod `json:\"today\"`\n\tLast7Days  UsagePeriod `json:\"last7Days\"`\n\tLast30Days UsagePeriod `json:\"last30Days\"`\n}\n```\n\n```go\ntype AudioInferenceRequest struct {\n\tTaskType       TaskType       `json:\"taskType\"`\n\tTaskUUID       uuid.UUID      `json:\"taskUUID\"`\n\tModel          string         `json:\"model\"`\n\tPositivePrompt string         `json:\"positivePrompt,omitempty\"`\n\tDuration       float64        `json:\"duration\"`\n\tNumberResults  int            `json:\"numberResults\"`\n\tOutputFormat   OutputFormat   `json:\"outputFormat,omitempty\"`\n\tDeliveryMethod DeliveryMethod `json:\"deliveryMethod,omitempty\"`\n\tIncludeCost    bool           `json:\"includeCost,omitempty\"`\n\tAudioSettings  *AudioSettings `json:\"audioSettings,omitempty\"`\n}\n```\nAudioInferenceRequest contains fields for the audioInference task type.\n\n```go\ntype AudioInferenceResult struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tStatus    string    `json:\"status,omitempty\"`\n\tAudioUUID uuid.UUID `json:\"audioUUID\"`\n\tAudioURL  string    `json:\"audioURL,omitempty\"`\n\tCost      float64   `json:\"cost,omitempty\"`\n}\n```\nAudioInferenceResult is a single audio result from the API.\n\n```go\ntype AudioSettings struct {\n\tSampleRate int `json:\"sampleRate,omitempty\"`\n\tBitrate    int `json:\"bitrate,omitempty\"`\n}\n```\nAudioSettings configures technical audio quality parameters.\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient provides business-logic methods for the Runware API. It delegates wire-level communication to the injected Transport.\n\n```go\nfunc NewClient(t transport.Transport, logger *slog.Logger) *Client\n```\nNewClient creates a Client backed by the given transport.\n\n```go\nfunc (c *Client) AccountDetails(ctx context.Context) (*AccountResult, error)\n```\nAccountDetails fetches account information.\n\n```go\nfunc (c *Client) MediaStorage(ctx context.Context, operation, media string) (*MediaStorageResult, error)\n```\nMediaStorage stores or removes media via the mediaStorage task. operation is \"upload\" or \"delete\"; media is the asset (publicly accessible URL, data URI, or base64 string) for upload, or the mediaUUID to remove for delete. Upload returns the stored asset's MediaUUID and MediaURL; delete returns just the MediaUUID.\n\n```go\nfunc (c *Client) ModelSearch(ctx context.Context, req ModelSearchRequest) (*ModelSearchResponse, error)\n```\nModelSearch searches for models on the Runware platform.\n\n```go\nfunc (c *Client) ModelUpload(ctx context.Context, req ModelUploadRequest, opts ModelUploadOptions) (*ModelUploadResult, error)\n```\nModelUpload submits a modelUpload task and follows the streamed pipeline statuses (validated → downloaded → optimized → stored) until the model is ready or the upload fails.\n\nThe pipeline statuses are only delivered as streamed frames over the WebSocket transport (the API does not expose them via getResponse polling), so the transport must implement [transport.StreamSender](/github.com/runware/runware-cli/internal/api/transport#StreamSender).\n\n```go\nfunc (c *Client) Ping(ctx context.Context) (*PingResult, error)\n```\nPing checks API connectivity.\n\n```go\nfunc (c *Client) Poll(ctx context.Context, taskID uuid.UUID, interval time.Duration, minResults int, onProgress func(int)) ([]json.RawMessage, error)\n```\nPoll polls for async task results using the getResponse task type. It blocks until at least minResults items with status \"success\" have been returned in a single poll cycle, a data item reports status \"error\", the context is canceled, or a fatal API/auth error occurs. minResults \\\u003c 1 is treated as 1.\n\nonProgress is called with the reported progress percentage (0–100) each time a \"processing\" status item is received. It may be nil.\n\n```go\nfunc (c *Client) Run(ctx context.Context, model string, args []string, opts RunOptions) ([]json.RawMessage, error)\n```\nRun executes the full inference lifecycle for the given model.\n\nmodel is the AIR identifier of the model to run (e.g. \"runware:101@1\"). args is a slice of key=value strings (e.g. \\[\"positivePrompt=hello\", \"width=1024\"]). They are parsed against the model's fetched JSON Schema so that type coercion (string vs number vs bool) is schema-driven rather than best-effort. System fields (taskType) are injected automatically; callers must not include it in args. deliveryMethod may be set via --delivery-method or a key=value argument. taskUUID is optional: supply it to use a specific identifier, or omit it to have one generated.\n\nFor async delivery Run polls until a success result is received or the context is canceled. For sync delivery the submit response is returned directly.\n\n```go\nfunc (c *Client) UploadImage(ctx context.Context, image string) (*ImageUploadResult, error)\n```\nUploadImage uploads an image to the Runware platform via the imageUpload task and returns the stored asset's UUID. image may be a publicly accessible URL, a data URI, or a base64-encoded image, per the API contract.\n\nSuperseded by MediaStorage, which handles any media type and supports deletion; retained for the deprecated \"upload\" command.\n\n```go\ntype DeliveryMethod string\n```\nDeliveryMethod specifies how task results are delivered.\n\n```go\nconst (\n\tDeliveryMethodAsync DeliveryMethod = \"async\"\n\tDeliveryMethodSync  DeliveryMethod = \"sync\"\n)\n```\n\n```go\ntype FrameImage struct {\n\tInputImage string `json:\"inputImage\"`\n\tFrame      any    `json:\"frame\"` // \"first\", \"last\", or int\n}\n```\nFrameImage constrains a specific frame with an input image.\n\n```go\ntype GetResponseRequest struct {\n\tTaskType TaskType  `json:\"taskType\"`\n\tTaskUUID uuid.UUID `json:\"taskUUID\"`\n}\n```\nGetResponseRequest is used to poll for async task results.\n\n```go\ntype ImageInferenceRequest struct {\n\tTaskType       TaskType     `json:\"taskType\"`\n\tTaskUUID       uuid.UUID    `json:\"taskUUID\"`\n\tPositivePrompt string       `json:\"positivePrompt\"`\n\tNegativePrompt string       `json:\"negativePrompt,omitempty\"`\n\tModel          string       `json:\"model\"`\n\tWidth          int          `json:\"width\"`\n\tHeight         int          `json:\"height\"`\n\tSteps          int          `json:\"steps,omitempty\"`\n\tNumberResults  int          `json:\"numberResults\"`\n\tCFGScale       float64      `json:\"CFGScale,omitempty\"`\n\tScheduler      string       `json:\"scheduler,omitempty\"`\n\tSeed           int64        `json:\"seed,omitempty\"`\n\tOutputFormat   OutputFormat `json:\"outputFormat,omitempty\"`\n\tInputImage     string       `json:\"inputImage,omitempty\"`\n\tStrength       float64      `json:\"strength,omitempty\"`\n\tMaskImage      string       `json:\"maskImage,omitempty\"`\n}\n```\nImageInferenceRequest contains fields for the imageInference task type.\n\n```go\ntype ImageInferenceResult struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tImageUUID uuid.UUID `json:\"imageUUID\"`\n\tImageURL  string    `json:\"imageURL\"`\n\tSeed      int64     `json:\"seed\"`\n}\n```\nImageInferenceResult is a single image result from the API.\n\n```go\ntype ImageUploadRequest struct {\n\tTaskType TaskType  `json:\"taskType\"`\n\tTaskUUID uuid.UUID `json:\"taskUUID\"`\n\tImage    string    `json:\"image\"`\n}\n```\nImageUploadRequest is the request payload for the imageUpload task.\n\n```go\ntype ImageUploadResult struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tImageUUID uuid.UUID `json:\"imageUUID\"`\n}\n```\nImageUploadResult is the response from an imageUpload task. ImageUUID is the stored asset identifier, reusable as input for other tasks.\n\n```go\ntype MediaStorageRequest struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tOperation string    `json:\"operation\"`\n\tMedia     string    `json:\"media\"`\n}\n```\nMediaStorageRequest is the request payload for the mediaStorage task. Operation is \"upload\" or \"delete\". Media is the asset (publicly accessible URL, data URI, or base64 string) for upload, or the mediaUUID to remove for delete.\n\n```go\ntype MediaStorageResult struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tOperation string    `json:\"operation\"`\n\tMediaUUID uuid.UUID `json:\"mediaUUID\"`\n\tMediaURL  string    `json:\"mediaURL,omitempty\"`\n}\n```\nMediaStorageResult is the response from a mediaStorage task. MediaURL is set only for the upload operation; delete returns just the MediaUUID that was removed.\n\n```go\ntype Message struct {\n\tRole    string `json:\"role\"`\n\tContent string `json:\"content\"`\n}\n```\nMessage represents a single message in a text inference conversation.\n\n```go\ntype ModelExample struct {\n\tID         string         `json:\"id\"`\n\tTitle      string         `json:\"title,omitempty\"`\n\tModel      string         `json:\"model\"`\n\tCapability string         `json:\"capability\"`\n\tAsset      string         `json:\"asset,omitempty\"`\n\tRequest    map[string]any `json:\"request,omitempty\"`\n\tResponse   map[string]any `json:\"response,omitempty\"`\n}\n```\nModelExample is one example request/response pair for a model.\n\n```go\nfunc FetchModelExamples(ctx context.Context, air string) ([]ModelExample, error)\n```\nFetchModelExamples retrieves the example requests for an identifier (AIR or model id) from the content service.\n\n```go\ntype ModelPricing struct {\n\tModel           string           `json:\"model\"`\n\tAIR             string           `json:\"air\"`\n\tName            string           `json:\"name\"`\n\tStatus          string           `json:\"status\"`\n\tReleasedAt      string           `json:\"releasedAt,omitempty\"`\n\tPricingOverview string           `json:\"pricingOverview,omitempty\"`\n\tPricingExamples []PricingExample `json:\"pricingExamples,omitempty\"`\n\tCategory        []string         `json:\"category,omitempty\"`\n}\n```\nModelPricing is the pricing summary for a model from the content service.\n\n```go\nfunc FetchModelPricing(ctx context.Context, air string) (*ModelPricing, error)\n```\nFetchModelPricing retrieves the pricing summary for an identifier (AIR or model id) from the content service. The endpoint accepts either form.\n\n```go\ntype ModelResult struct {\n\tName                 string    `json:\"name\"`\n\tAIR                  string    `json:\"air\"`\n\tTags                 ModelTags `json:\"tags\"`\n\tImageURL             string    `json:\"imageURL\"`\n\tThumbnailURL         string    `json:\"thumbnailURL\"`\n\tCategory             string    `json:\"category\"`\n\tPrivate              bool      `json:\"private\"`\n\tBaseModel            string    `json:\"baseModel,omitempty\"`\n\tVersion              string    `json:\"version\"`\n\tArchitecture         string    `json:\"architecture\"`\n\tNSFWLevel            int       `json:\"nsfwLevel\"`\n\tType                 string    `json:\"type,omitempty\"`\n\tDefaultWeight        float64   `json:\"defaultWeight,omitempty\"`\n\tDefaultWidth         int       `json:\"defaultWidth,omitempty\"`\n\tDefaultHeight        int       `json:\"defaultHeight,omitempty\"`\n\tDefaultSteps         int       `json:\"defaultSteps,omitempty\"`\n\tDefaultScheduler     string    `json:\"defaultScheduler,omitempty\"`\n\tDefaultCFG           float64   `json:\"defaultCFG,omitempty\"`\n\tDefaultStrength      float64   `json:\"defaultStrength,omitempty\"`\n\tPositiveTriggerWords string    `json:\"positiveTriggerWords,omitempty\"`\n\tNegativeTriggerWords string    `json:\"negativeTriggerWords,omitempty\"`\n\tPrimary              bool      `json:\"primary,omitempty\"`\n}\n```\nModelResult is a single model from the search results.\n\n```go\ntype ModelSchema struct {\n\tRequestSchema  json.RawMessage `json:\"requestSchema\"`\n\tResponseSchema json.RawMessage `json:\"responseSchema\"`\n\tDocumentation  string          `json:\"documentation\"`\n}\n```\nModelSchema is the response from the schema resolve endpoint.\n\n```go\nfunc FetchModelSchema(ctx context.Context, air string) (*ModelSchema, error)\n```\nFetchModelSchema retrieves the request and response JSON Schema for the given AIR identifier from the Runware schema service. This endpoint is unauthenticated and separate from the inference API transport.\n\n```go\nfunc (s ModelSchema) MarshalYAML() (any, error)\n```\nMarshalYAML converts ModelSchema to a form the YAML encoder can handle. json.RawMessage fields are \\[]byte, which would otherwise be base64-encoded by the YAML encoder. Unmarshaling them to any first produces native Go maps/slices that YAML can render as structured output.\n\n```go\ntype ModelSearchRequest struct {\n\tTaskType     TaskType  `json:\"taskType\"`\n\tTaskUUID     uuid.UUID `json:\"taskUUID\"`\n\tSearch       string    `json:\"search,omitempty\"`\n\tTags         []string  `json:\"tags,omitempty\"`\n\tCategory     string    `json:\"category,omitempty\"`\n\tType         string    `json:\"type,omitempty\"`\n\tArchitecture string    `json:\"architecture,omitempty\"`\n\tConditioning string    `json:\"conditioning,omitempty\"`\n\tVisibility   string    `json:\"visibility,omitempty\"`\n\tLimit        int       `json:\"limit,omitempty\"`\n\tOffset       int       `json:\"offset,omitempty\"`\n}\n```\nModelSearchRequest contains fields for the modelSearch task type.\n\n```go\ntype ModelSearchResponse struct {\n\tTaskType     TaskType      `json:\"taskType\"`\n\tTaskUUID     uuid.UUID     `json:\"taskUUID\"`\n\tResults      []ModelResult `json:\"results\"`\n\tTotalResults int           `json:\"totalResults\"`\n}\n```\nModelSearchResponse is the response wrapper from modelSearch.\n\n```go\ntype ModelTags []string\n```\nModelTags decodes a JSON array of strings. Non-string elements (e.g. internal numeric IDs returned when a server-side join fails) are silently dropped.\n\n```go\nfunc (s *ModelTags) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ModelUploadOptions struct {\n\t// OnStatus is called for each intermediate pipeline status\n\t// (validated, downloaded, optimized, stored). It may be nil.\n\tOnStatus func(status, message string)\n}\n```\nModelUploadOptions configures the behavior of Client.ModelUpload.\n\n```go\ntype ModelUploadRequest struct {\n\tTaskType             TaskType  `json:\"taskType\"`\n\tTaskUUID             uuid.UUID `json:\"taskUUID\"`\n\tCategory             string    `json:\"category\"`\n\tName                 string    `json:\"name\"`\n\tVersion              string    `json:\"version\"`\n\tDownloadURL          string    `json:\"downloadURL\"`\n\tArchitecture         string    `json:\"architecture\"`\n\tFormat               string    `json:\"format,omitempty\"`\n\tType                 string    `json:\"type,omitempty\"`\n\tAIR                  string    `json:\"air,omitempty\"`\n\tUniqueIdentifier     string    `json:\"uniqueIdentifier,omitempty\"`\n\tHeroImageURL         string    `json:\"heroImageURL,omitempty\"`\n\tTags                 []string  `json:\"tags,omitempty\"`\n\tShortDescription     string    `json:\"shortDescription,omitempty\"`\n\tComment              string    `json:\"comment,omitempty\"`\n\tPrivate              *bool     `json:\"private,omitempty\"`\n\tDefaultCFG           *float64  `json:\"defaultCFG,omitempty\"`\n\tDefaultSteps         *int      `json:\"defaultSteps,omitempty\"`\n\tDefaultScheduler     string    `json:\"defaultScheduler,omitempty\"`\n\tDefaultStrength      *float64  `json:\"defaultStrength,omitempty\"`\n\tDefaultWeight        *float64  `json:\"defaultWeight,omitempty\"`\n\tPositiveTriggerWords string    `json:\"positiveTriggerWords,omitempty\"`\n}\n```\nModelUploadRequest contains fields for the modelUpload task type. Optional non-string fields are pointers so they are omitted from the payload unless explicitly set.\n\n```go\ntype ModelUploadResult struct {\n\tTaskType TaskType  `json:\"taskType\"`\n\tTaskUUID uuid.UUID `json:\"taskUUID\"`\n\tStatus   string    `json:\"status\"`\n\tMessage  string    `json:\"message,omitempty\"`\n\tAIR      string    `json:\"air,omitempty\"`\n}\n```\nModelUploadResult is a single status/result frame from the modelUpload pipeline. Status progresses validated → downloaded → optimized → stored → ready, or terminates with a failure status such as \"failed\" or \"error downloading\".\n\n```go\ntype OutputFormat string\n```\nOutputFormat specifies the media output format.\n\n```go\nconst (\n\tOutputFormatPNG  OutputFormat = \"png\"\n\tOutputFormatJPG  OutputFormat = \"jpg\"\n\tOutputFormatJPEG OutputFormat = \"jpeg\"\n\tOutputFormatWebP OutputFormat = \"webp\"\n\tOutputFormatMP3  OutputFormat = \"mp3\"\n\tOutputFormatMP4  OutputFormat = \"mp4\"\n\tOutputFormatText OutputFormat = \"text\"\n\tOutputFormatJSON OutputFormat = \"json\"\n)\n```\n\n```go\ntype PingRequest struct {\n\tTaskType TaskType  `json:\"taskType\"`\n\tTaskUUID uuid.UUID `json:\"taskUUID\"`\n}\n```\nPingRequest is the request payload for the ping task.\n\n```go\ntype PingResult struct {\n\tTaskType TaskType `json:\"taskType\"`\n\tPong     bool     `json:\"pong\"`\n}\n```\nPingResult is the response from a ping task.\n\n```go\ntype PricingExample struct {\n\tConfiguration string `json:\"configuration\"`\n\tPrice         string `json:\"price\"`\n}\n```\nPricingExample is one configuration/price pair in a model's pricing.\n\n```go\ntype RunOptions struct {\n\t// TaskType overrides the task type detected from the model schema.\n\t// Required when the schema is unavailable or does not encode a task type.\n\tTaskType string\n\n\t// DeliveryMethod overrides the delivery method resolved from the model schema.\n\t// Accepted values: \"sync\", \"async\". Empty means resolve from schema or payload.\n\tDeliveryMethod string\n\n\t// PollInterval is the interval between getResponse polls when delivery is async.\n\t// Defaults to 2 seconds when zero.\n\tPollInterval time.Duration\n\n\t// OnProgress is called with the reported progress percentage (0–100) during async\n\t// polling. It may be nil.\n\tOnProgress func(int)\n\n\t// OnSubmit is called with the generated task UUID after the initial request is\n\t// submitted but before async polling begins. It may be nil.\n\tOnSubmit func(taskUUID uuid.UUID)\n\n\t// Validate enables client-side validation of required and conditional\n\t// constraints against the model schema. Off by default so the API remains the\n\t// source of truth for requirements (the fetched schema can disagree with the\n\t// live API — see RUN-10584).\n\tValidate bool\n}\n```\nRunOptions configures the behavior of Client.Run.\n\n```go\ntype TaskType string\n```\nTaskType identifies the Runware API task. Set by client methods; not exposed to callers.\n\n```go\ntype TeamMember struct {\n\tName     string    `json:\"name\"`\n\tEmail    string    `json:\"email\"`\n\tRoles    []string  `json:\"roles\"`\n\tJoinedAt time.Time `json:\"joinedAt,omitzero\" yaml:\"joinedat,omitempty\"`\n}\n```\nTeamMember is a member of the organization.\n\n```go\ntype TextInferenceRequest struct {\n\tTaskType      TaskType     `json:\"taskType\"`\n\tTaskUUID      uuid.UUID    `json:\"taskUUID\"`\n\tModel         string       `json:\"model\"`\n\tMessages      []Message    `json:\"messages\"`\n\tMaxTokens     int          `json:\"maxTokens,omitempty\"`\n\tTemperature   float64      `json:\"temperature,omitempty\"`\n\tTopP          float64      `json:\"topP,omitempty\"`\n\tTopK          int          `json:\"topK,omitempty\"`\n\tSeed          int64        `json:\"seed,omitempty\"`\n\tStopSequences []string     `json:\"stopSequences,omitempty\"`\n\tNumberResults int          `json:\"numberResults,omitempty\"`\n\tSystemPrompt  string       `json:\"systemPrompt,omitempty\"`\n\tOutputFormat  OutputFormat `json:\"outputFormat,omitempty\"`\n\tIncludeCost   bool         `json:\"includeCost,omitempty\"`\n}\n```\nTextInferenceRequest contains fields for the textInference task type.\n\n```go\ntype TextInferenceResult struct {\n\tTaskType     TaskType           `json:\"taskType\"`\n\tTaskUUID     uuid.UUID          `json:\"taskUUID\"`\n\tText         string             `json:\"text\"`\n\tFinishReason string             `json:\"finishReason,omitempty\"`\n\tUsage        TextInferenceUsage `json:\"usage\"`\n\tCost         float64            `json:\"cost,omitempty\"`\n}\n```\nTextInferenceResult is a single text result from the API.\n\n```go\ntype TextInferenceUsage struct {\n\tInputTokens  int `json:\"inputTokens,omitempty\"`\n\tOutputTokens int `json:\"outputTokens,omitempty\"`\n\tTotalTokens  int `json:\"totalTokens,omitempty\"`\n}\n```\nTextInferenceUsage contains token usage statistics.\n\n```go\ntype UsagePeriod struct {\n\tCredits  float64 `json:\"credits\"`\n\tRequests int     `json:\"requests\"`\n}\n```\n\n```go\ntype VideoInferenceRequest struct {\n\tTaskType       TaskType       `json:\"taskType\"`\n\tTaskUUID       uuid.UUID      `json:\"taskUUID\"`\n\tModel          string         `json:\"model\"`\n\tPositivePrompt string         `json:\"positivePrompt,omitempty\"`\n\tNegativePrompt string         `json:\"negativePrompt,omitempty\"`\n\tWidth          int            `json:\"width,omitempty\"`\n\tHeight         int            `json:\"height,omitempty\"`\n\tDuration       float64        `json:\"duration,omitempty\"`\n\tSteps          int            `json:\"steps,omitempty\"`\n\tCFGScale       float64        `json:\"CFGScale,omitempty\"`\n\tSeed           int64          `json:\"seed,omitempty\"`\n\tNumberResults  int            `json:\"numberResults,omitempty\"`\n\tOutputFormat   OutputFormat   `json:\"outputFormat,omitempty\"`\n\tDeliveryMethod DeliveryMethod `json:\"deliveryMethod,omitempty\"`\n\tFrameImages    []FrameImage   `json:\"frameImages,omitempty\"`\n\tIncludeCost    bool           `json:\"includeCost,omitempty\"`\n}\n```\nVideoInferenceRequest contains fields for the videoInference task type.\n\n```go\ntype VideoInferenceResult struct {\n\tTaskType  TaskType  `json:\"taskType\"`\n\tTaskUUID  uuid.UUID `json:\"taskUUID\"`\n\tStatus    string    `json:\"status,omitempty\"`\n\tVideoUUID uuid.UUID `json:\"videoUUID\"`\n\tVideoURL  string    `json:\"videoURL,omitempty\"`\n\tMediaUUID uuid.UUID `json:\"mediaUUID\"`\n\tMediaURL  string    `json:\"mediaURL,omitempty\"`\n\tSeed      int64     `json:\"seed,omitempty\"`\n\tCost      float64   `json:\"cost,omitempty\"`\n}\n```\nVideoInferenceResult is a single video result from the API.\n\n","path":"github.com/runware/runware-cli/internal/api","name":"api","synopsis":"","isRedistributable":true}
