{"openapi":"3.0.1","info":{"title":"Crynux AS","description":"The AI Services backend for the Crynux Network","version":"1.0.0"},"paths":{"/v1/account":{"get":{"tags":["Account"],"summary":"Get the Credits balance of the account","operationId":"GetBalance","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBalanceResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/account/charges":{"get":{"tags":["Account"],"summary":"Get the Credits charge records of the account","operationId":"GetCharges","parameters":[{"name":"limit","in":"query","description":"The maximum number of the charge records to return","schema":{"type":"integer","description":"The maximum number of the charge records to return","format":"int32"}},{"name":"offset","in":"query","description":"The offset of the charge records","schema":{"type":"integer","description":"The offset of the charge records","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChargesResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/account/purchases":{"get":{"tags":["Account"],"summary":"Get the purchase records of the account","operationId":"GetPurchases","parameters":[{"name":"limit","in":"query","description":"The maximum number of the purchase records to return","schema":{"type":"integer","description":"The maximum number of the purchase records to return","format":"int32"}},{"name":"offset","in":"query","description":"The offset of the purchase records","schema":{"type":"integer","description":"The offset of the purchase records","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPurchasesResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/account/stats":{"get":{"tags":["Account"],"summary":"Get the usage stats of the account","operationId":"GetAccountStats","parameters":[{"name":"range","in":"query","description":"Stats range: 1d, 7d, or 1m","required":true,"schema":{"type":"string","description":"Stats range: 1d, 7d, or 1m"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountStatsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/auth/login":{"post":{"tags":["Auth"],"summary":"Login with a wallet signature and get a JWT token","operationId":"Login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/llm/billing_config":{"get":{"tags":["LLM"],"summary":"Get the configured LLM billing reference priority and Credits conversion","operationId":"GetBillingConfig","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBillingConfigResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/llm/pricing_examples":{"get":{"tags":["LLM"],"summary":"Get model coefficient rows for Credits and execution-time examples","operationId":"GetPricingExamples","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPricingExamplesResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List the projects of the account","operationId":"ListProjects","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}},"post":{"tags":["Projects"],"summary":"Create a project","operationId":"CreateProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get a project by ID","operationId":"GetProject","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}},"put":{"tags":["Projects"],"summary":"Update a project","operationId":"UpdateProject","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a project","operationId":"DeleteProject","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}/api_key/reset":{"post":{"tags":["Projects"],"summary":"Reset the API key of a project","operationId":"ResetAPIKey","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetAPIKeyResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}/requests":{"get":{"tags":["Projects"],"summary":"Get the recent LLM call records of a project","operationId":"GetProjectRequests","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectRequestsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}/stats":{"get":{"tags":["Projects"],"summary":"Get the usage stats of a project","operationId":"GetProjectStats","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}},{"name":"range","in":"query","description":"Stats range: 1d or 1m","required":true,"schema":{"type":"string","description":"Stats range: 1d or 1m"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectStatsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}/stats/completion-duration":{"get":{"tags":["Projects"],"summary":"Get the completion duration histogram of a project","operationId":"GetProjectCompletionDurationStats","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}},{"name":"range","in":"query","description":"Stats range: 1h, 1d, or 7d","required":true,"schema":{"type":"string","description":"Stats range: 1h, 1d, or 7d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectCompletionDurationStatsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/projects/{project_id}/stats/models":{"get":{"tags":["Projects"],"summary":"Get the top model usage stats of a project","operationId":"GetProjectModelStats","parameters":[{"name":"project_id","in":"path","description":"The project ID","required":true,"schema":{"type":"integer","description":"The project ID","format":"int32"}},{"name":"range","in":"query","description":"Stats range: 1h, 1d, or 7d","required":true,"schema":{"type":"string","description":"Stats range: 1h, 1d, or 7d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectModelStatsResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/v1/purchase/networks":{"get":{"tags":["Purchase"],"summary":"Get the configured purchase networks and tokens","operationId":"GetNetworks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetNetworksResponse"}}}},"400":{"description":"validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}}},"components":{"schemas":{"AccountStatsCountPoint":{"type":"object","properties":{"complete":{"type":"boolean"},"timestamp":{"type":"integer","format":"int64"},"value":{"type":"integer","format":"int64"}}},"AccountStatsSeriesPoint":{"type":"object","properties":{"complete":{"type":"boolean"},"timestamp":{"type":"integer","format":"int64"},"value":{"type":"string"}}},"BigInt":{"type":"object","description":"Credits charged, null while in progress"},"BillingConfigData":{"type":"object","properties":{"base_vram":{"type":"integer","description":"Base VRAM in GB used for vram_weight","format":"int64"},"credits_per_gwei":{"type":"string","description":"Credits charged per billable Gwei as a positive decimal string"},"highest_priority_gwei":{"type":"string","description":"Current queue highest priority in Gwei when the queue is non-empty","nullable":true},"lowest_priority_gwei":{"type":"string","description":"Current queue lowest priority in Gwei when the queue is non-empty","nullable":true},"max_priority_gwei":{"type":"string","description":"Maximum allowed project Cost Level priority_gwei"},"median_priority_gwei":{"type":"string","description":"Current queue median priority hint in Gwei"},"min_priority_gwei":{"type":"string","description":"Minimum allowed project Cost Level priority_gwei"}}},"ChargeData":{"type":"object","properties":{"billed_vram":{"type":"integer","description":"Effective VRAM in GB used for billing","format":"int64"},"completion_tokens":{"type":"integer","description":"Billed completion token count","format":"int64"},"created_at":{"type":"string","description":"When the call was recorded","format":"date-time"},"credits":{"$ref":"#/components/schemas/BigInt"},"duration_ms":{"type":"integer","description":"Call duration in milliseconds","format":"int64"},"id":{"type":"integer","description":"The LLM call record ID","format":"int32"},"model":{"type":"string","description":"The model ID used for the call"},"priority_gwei":{"type":"string","description":"Project Cost Level priority in Gwei used for the charge"},"project_id":{"type":"integer","description":"The project that made the call","format":"int32"},"project_name":{"type":"string","description":"The current project name"},"prompt_tokens":{"type":"integer","description":"Billed prompt token count","format":"int64"},"status":{"type":"integer","description":"Call status (success or failed)","format":"int32"},"total_tokens":{"type":"integer","description":"Billed total token count","format":"int64"}}},"CompletionDurationBucketData":{"type":"object","properties":{"bucket_index":{"type":"integer","format":"int32"},"bucket_label":{"type":"string"},"max_duration_ms":{"type":"integer","format":"int64","nullable":true},"min_duration_ms":{"type":"integer","format":"int64"},"request_count":{"type":"integer","format":"int64"}}},"CreateProjectData":{"type":"object","properties":{"api_key":{"type":"string","description":"The plaintext API key. Returned only once at creation"},"api_key_prefix":{"type":"string","description":"The public prefix of the project API key"},"auto_max_priority_gwei":{"type":"string","description":"Auto Cost Level max priority in Gwei","nullable":true},"auto_queue_position":{"type":"integer","description":"Auto Cost Level queue position from 0 to 100","format":"int32","nullable":true},"cost_level_mode":{"type":"string","description":"Cost Level mode: static or auto"},"created_at":{"type":"integer","description":"The unix timestamp when the project is created","format":"int64"},"credits_day":{"type":"string","description":"Credits charged for the current Unix day"},"elevated_recent_failure_rate":{"type":"boolean","description":"True when recent-window failure rate is strictly above the configured threshold"},"endpoint_token":{"type":"string","description":"The unique token in the private LLM API base URL of the project"},"failure_count_day":{"type":"integer","description":"Failed request count for the current Unix day","format":"int64"},"id":{"type":"integer","description":"The project ID","format":"int32"},"last_request_at":{"type":"integer","description":"Unix timestamp of the latest finished request that entered usage stats","format":"int64","nullable":true},"name":{"type":"string","description":"The project name"},"priority_gwei":{"type":"string","description":"Static Cost Level priority in Gwei"},"recent_window_failure_count":{"type":"integer","description":"Failed request count in the configured recent failure window","format":"int64"},"recent_window_success_count":{"type":"integer","description":"Successful request count in the configured recent failure window","format":"int64"},"request_count_day":{"type":"integer","description":"Finished request count for the current Unix day","format":"int64"},"status":{"type":"integer","description":"The project status","format":"int32"},"success_count_day":{"type":"integer","description":"Successful request count for the current Unix day","format":"int64"}}},"CreateProjectInput":{"type":"object","properties":{"name":{"type":"string","description":"The project name"}},"required":["name"]},"CreateProjectResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateProjectData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"Deposit":{"type":"object","properties":{"amount":{"$ref":"#/components/schemas/BigInt"},"created_at":{"type":"string","format":"date-time"},"credits":{"$ref":"#/components/schemas/BigInt"},"from_address":{"type":"string"},"id":{"type":"integer","format":"int32"},"log_index":{"type":"integer","format":"int32"},"network":{"type":"string"},"status":{"type":"integer","format":"int32"},"token":{"type":"string"},"tx_hash":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"integer","format":"int32"}}},"ExceptionResponse":{"type":"object","properties":{"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetAccountStatsData":{"type":"object","properties":{"completion_tokens":{"type":"integer","format":"int64"},"credits":{"type":"string"},"credits_series":{"type":"array","items":{"$ref":"#/components/schemas/AccountStatsSeriesPoint"}},"prompt_tokens":{"type":"integer","format":"int64"},"range":{"type":"string"},"request_count":{"type":"integer","format":"int64"},"requests_series":{"type":"array","items":{"$ref":"#/components/schemas/AccountStatsCountPoint"}},"success_rate":{"type":"number","format":"double"}}},"GetAccountStatsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetAccountStatsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetBalanceData":{"type":"object","properties":{"address":{"type":"string","description":"The wallet address of the user"},"balance":{"$ref":"#/components/schemas/BigInt"}}},"GetBalanceResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetBalanceData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetBillingConfigResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingConfigData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetChargesData":{"type":"object","properties":{"charges":{"type":"array","items":{"$ref":"#/components/schemas/ChargeData"},"description":"The charge records of the account"},"total":{"type":"integer","description":"The total number of the charge records","format":"int64"}}},"GetChargesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetChargesData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetNetworksData":{"type":"object","properties":{"networks":{"type":"array","items":{"$ref":"#/components/schemas/NetworkData"},"description":"Configured purchase networks and tokens"}}},"GetNetworksResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetNetworksData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetPricingExamplesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PricingExamplesData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetProjectCompletionDurationStatsData":{"type":"object","properties":{"buckets":{"type":"array","items":{"$ref":"#/components/schemas/CompletionDurationBucketData"}},"range":{"type":"string"},"window_end":{"type":"integer","format":"int64"},"window_start":{"type":"integer","format":"int64"}}},"GetProjectCompletionDurationStatsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetProjectCompletionDurationStatsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetProjectModelStatsData":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/ProjectModelStatsItem"}},"range":{"type":"string"},"window_end":{"type":"integer","format":"int64"},"window_start":{"type":"integer","format":"int64"}}},"GetProjectModelStatsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetProjectModelStatsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetProjectRequestsData":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRequestData"},"description":"Recent in-progress and finished LLM requests"}}},"GetProjectRequestsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetProjectRequestsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetProjectStatsData":{"type":"object","properties":{"credits_series":{"type":"array","items":{"$ref":"#/components/schemas/ProjectStatsCreditsPoint"}},"range":{"type":"string"},"request_series":{"type":"array","items":{"$ref":"#/components/schemas/ProjectStatsCountPoint"}},"token_series":{"type":"array","items":{"$ref":"#/components/schemas/ProjectStatsTokenPoint"}}}},"GetProjectStatsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetProjectStatsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"GetPurchasesData":{"type":"object","properties":{"purchases":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"},"description":"The purchase records of the account"},"total":{"type":"integer","description":"The total number of the purchase records","format":"int64"}}},"GetPurchasesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetPurchasesData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"ListProjectsData":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectData"},"description":"The projects of the account"}}},"ListProjectsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ListProjectsData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"LoginData":{"type":"object","properties":{"expires_at":{"type":"integer","description":"The unix timestamp when the token expires","format":"int64"},"token":{"type":"string","description":"The JWT token for subsequent API calls"}}},"LoginInput":{"type":"object","properties":{"address":{"type":"string","description":"The wallet address of the user"},"signature":{"type":"string","description":"The wallet signature of the login message"},"timestamp":{"type":"integer","description":"The unix timestamp when the message is signed","format":"int64"}},"required":["address","signature","timestamp"]},"LoginResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LoginData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"NetworkData":{"type":"object","properties":{"chain_id":{"type":"integer","description":"EVM chain ID","format":"int64"},"name":{"type":"string","description":"Blockchain network name key from configuration"},"receiving_address":{"type":"string","description":"Platform address that receives ERC20 payments for Credits purchases"},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/TokenData"},"description":"Supported ERC20 tokens on this network"}}},"NotFoundErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"PricingExampleRow":{"type":"object","properties":{"constant_seconds":{"type":"number","description":"Relay constant seconds coefficient","format":"double"},"min_vram":{"type":"integer","description":"Model minimum VRAM in GB","format":"int64"},"model":{"type":"string","description":"Selected model id"},"seconds_per_input_token":{"type":"number","description":"Relay seconds per input token","format":"double"},"seconds_per_output_token":{"type":"number","description":"Relay seconds per output token","format":"double"}}},"PricingExamplesData":{"type":"object","properties":{"examples":{"type":"array","items":{"$ref":"#/components/schemas/PricingExampleRow"},"description":"Selected per-model coefficient rows"},"pricing_completion_tokens":{"type":"integer","description":"Token count for the Credits-per-1M Output unit example","format":"int64"},"pricing_prompt_tokens":{"type":"integer","description":"Token count for the Credits-per-1M Input unit example","format":"int64"},"time_completion_tokens":{"type":"integer","description":"Completion tokens for execution-time examples","format":"int64"},"time_prompt_tokens":{"type":"integer","description":"Prompt tokens for execution-time examples","format":"int64"}}},"ProjectData":{"type":"object","properties":{"api_key_prefix":{"type":"string","description":"The public prefix of the project API key"},"auto_max_priority_gwei":{"type":"string","description":"Auto Cost Level max priority in Gwei","nullable":true},"auto_queue_position":{"type":"integer","description":"Auto Cost Level queue position from 0 to 100","format":"int32","nullable":true},"cost_level_mode":{"type":"string","description":"Cost Level mode: static or auto"},"created_at":{"type":"integer","description":"The unix timestamp when the project is created","format":"int64"},"credits_day":{"type":"string","description":"Credits charged for the current Unix day"},"elevated_recent_failure_rate":{"type":"boolean","description":"True when recent-window failure rate is strictly above the configured threshold"},"endpoint_token":{"type":"string","description":"The unique token in the private LLM API base URL of the project"},"failure_count_day":{"type":"integer","description":"Failed request count for the current Unix day","format":"int64"},"id":{"type":"integer","description":"The project ID","format":"int32"},"last_request_at":{"type":"integer","description":"Unix timestamp of the latest finished request that entered usage stats","format":"int64","nullable":true},"name":{"type":"string","description":"The project name"},"priority_gwei":{"type":"string","description":"Static Cost Level priority in Gwei"},"recent_window_failure_count":{"type":"integer","description":"Failed request count in the configured recent failure window","format":"int64"},"recent_window_success_count":{"type":"integer","description":"Successful request count in the configured recent failure window","format":"int64"},"request_count_day":{"type":"integer","description":"Finished request count for the current Unix day","format":"int64"},"status":{"type":"integer","description":"The project status","format":"int32"},"success_count_day":{"type":"integer","description":"Successful request count for the current Unix day","format":"int64"}}},"ProjectModelStatsItem":{"type":"object","properties":{"completion_tokens":{"type":"integer","format":"int64"},"credits":{"type":"string"},"model":{"type":"string"},"prompt_tokens":{"type":"integer","format":"int64"},"rank":{"type":"integer","format":"int32"},"request_count":{"type":"integer","format":"int64"},"success_rate":{"type":"number","format":"double"}}},"ProjectRequestData":{"type":"object","properties":{"billed_vram":{"type":"integer","description":"Effective VRAM in GB used for billing","format":"int64"},"completion_tokens":{"type":"integer","description":"Billed completion token count, null while in progress","format":"int64","nullable":true},"created_at":{"type":"string","description":"When the request was accepted","format":"date-time"},"credits":{"$ref":"#/components/schemas/BigInt"},"duration_ms":{"type":"integer","description":"Call duration in milliseconds, null while in progress","format":"int64","nullable":true},"id":{"type":"integer","description":"Numeric ID from the source table","format":"int32"},"model":{"type":"string","description":"The model ID used for the call"},"priority_gwei":{"type":"string","description":"Project Cost Level priority in Gwei"},"prompt_tokens":{"type":"integer","description":"Billed prompt token count, null while in progress","format":"int64","nullable":true},"source":{"type":"string","description":"job or call_record"},"status":{"type":"string","description":"queued, in_progress, success, or failed"},"total_tokens":{"type":"integer","description":"Billed total token count, null while in progress","format":"int64","nullable":true}}},"ProjectResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProjectData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"ProjectStatsCountPoint":{"type":"object","properties":{"complete":{"type":"boolean"},"failure_count":{"type":"integer","format":"int64"},"success_count":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"}}},"ProjectStatsCreditsPoint":{"type":"object","properties":{"complete":{"type":"boolean"},"timestamp":{"type":"integer","format":"int64"},"value":{"type":"string"}}},"ProjectStatsTokenPoint":{"type":"object","properties":{"complete":{"type":"boolean"},"completion_tokens":{"type":"integer","format":"int64"},"prompt_tokens":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"}}},"ResetAPIKeyData":{"type":"object","properties":{"api_key":{"type":"string","description":"The plaintext API key. Returned only once at reset"},"api_key_prefix":{"type":"string","description":"The public prefix of the project API key"}}},"ResetAPIKeyResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ResetAPIKeyData"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"Response":{"type":"object","properties":{"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}},"TokenData":{"type":"object","properties":{"address":{"type":"string","description":"ERC20 contract address"},"credits_per_token":{"type":"integer","description":"Credits awarded for one whole token","format":"int64"},"decimals":{"type":"integer","description":"Token decimals","format":"int32"},"name":{"type":"string","description":"Token name key from configuration"}}},"UpdateProjectInput":{"type":"object","properties":{"auto_max_priority_gwei":{"type":"string","description":"Auto Cost Level max priority in Gwei","nullable":true},"auto_queue_position":{"type":"integer","description":"Auto Cost Level queue position from 0 to 100","format":"int32","nullable":true},"cost_level_mode":{"type":"string","description":"Cost Level mode: static or auto","nullable":true},"name":{"type":"string","description":"The new project name","nullable":true},"priority_gwei":{"type":"string","description":"Static Cost Level priority in Gwei","nullable":true}}},"ValidationErrorResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"field_name":{"type":"string","description":"The name of the field that fails the validation"},"message":{"type":"string","description":"The error type of the validation that fails"}},"description":"The validation error detail"},"message":{"type":"string","description":"The response message. Will be 'success' or a detailed error type"}}}}},"tags":[{"name":"Account","description":"Account APIs"},{"name":"ApiV1","description":"API version 1"},{"name":"Auth","description":"Wallet login APIs"},{"name":"LLM","description":"LLM configuration APIs"},{"name":"Projects","description":"Project APIs"},{"name":"Purchase","description":"Purchase configuration APIs"}]}