### Run Infera Node Source: https://docs.infera.org/node/macos Starts the Infera Node after installation. This command is an alias created during the installation process, simplifying node execution. ```bash init-infera ``` -------------------------------- ### Run Infera Node Source: https://docs.infera.org/node/linux Starts the Infera Node service after installation. This command initiates the node's operation, allowing it to connect to the Infera network and receive jobs. Ensure Ollama is running and prerequisites are met before execution. ```bash init-infera ``` -------------------------------- ### Install Infera Node CLI on Mac M Series Source: https://docs.infera.org/node/macos Installs the Infera Node CLI program on Mac OS with M series chips using a curl script. It also sets up a Zsh alias for easier execution. ```bash curl -sSL http://downloads.infera.org/infera-apple-m.sh | bash echo "alias init-infera='~/infera'" >> ~/.zshrc && source ~/.zshrc ``` -------------------------------- ### Update Infera Node CLI on Mac M Series Source: https://docs.infera.org/node/macos Updates the Infera Node by removing the existing installation and re-downloading the latest version using a curl script. This ensures you have the most recent features and fixes. ```bash rm -rf ~/infera curl -sSL http://downloads.infera.org/infera-apple-m.sh | bash ``` -------------------------------- ### Install Infera Node CLI (Linux Intel) Source: https://docs.infera.org/node/linux Downloads and executes the Infera Node installation script for Linux systems with Intel CPUs. This script sets up the necessary files for running an Infera Node and requires a GPU and Ollama to be pre-installed. ```bash curl -sSL http://downloads.infera.org/infera-linux-intel.sh | bash ``` -------------------------------- ### Update Infera Node (Linux Intel) Source: https://docs.infera.org/node/linux Removes the existing Infera installation and downloads the latest version for Linux systems with Intel CPUs. This ensures you have the most recent features and bug fixes. It requires a GPU and Ollama to be installed. ```bash rm -rf ~/infera curl -sSL http://downloads.infera.org/infera-apple-m.sh | bash ``` -------------------------------- ### Install Infera Node CLI (Linux AMD) Source: https://docs.infera.org/node/linux Downloads and executes the Infera Node installation script for Linux systems with AMD CPUs. This script sets up the necessary files for running an Infera Node and requires a GPU and Ollama to be pre-installed. ```bash curl -sSL http://downloads.infera.org/infera-linux-amd.sh | bash ``` -------------------------------- ### Update Infera Node (Linux AMD) Source: https://docs.infera.org/node/linux Removes the existing Infera installation and downloads the latest version for Linux systems with AMD CPUs. This ensures you have the most recent features and bug fixes. It requires a GPU and Ollama to be installed. ```bash rm -rf ~/infera curl -sSL http://downloads.infera.org/infera-linux-amd.sh | bash ``` -------------------------------- ### Run Infera Node Executable Source: https://docs.infera.org/node/windows This snippet describes the process of running the Infera Node executable on Windows. It requires the `infera-node.exe` file to be present and accessible, typically after downloading and extracting the installation scripts. ```bash double-click "infera-node.exe" ``` -------------------------------- ### Uninstall Infera Node Source: https://docs.infera.org/node/linux Removes all Infera Node files from your computer. This command cleans up the installation directory to fully uninstall the program from your system. ```bash rm -rf ~/infera ``` -------------------------------- ### Uninstall Infera Node Source: https://docs.infera.org/node/macos Removes the Infera Node installation from the user's home directory. This command deletes the infera folder and associated files. ```bash rm -rf ~/infera ``` -------------------------------- ### Get Unique Nodes API Endpoint Source: https://docs.infera.org/api-reference/endpoint/get-unique-nodes This OpenAPI specification details the GET request for the /unique_nodes endpoint. It allows fetching unique nodes with optional date filtering. The endpoint requires a model name and supports start and end dates in ISO format. It returns a successful response or a validation error. ```APIDOC get /unique_nodes paths: path: /unique_nodes method: get servers: - url: https://api.infera.org/ description: Infera production servers request: security: [] parameters: path: {} query: model_name: schema: - type: string required: true title: Model Name start_date: schema: - type: string required: false title: Start Date description: Start date for the range (ISO format) format: date-time - type: 'null' required: false title: Start Date description: Start date for the range (ISO format) end_date: schema: - type: string required: false title: End Date description: End date for the range (ISO format) format: date-time - type: 'null' required: false title: End Date description: End date for the range (ISO format) header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response '422': application/json: schemaArray: - type: object properties: detail: allOf: - items: $ref: '#/components/schemas/ValidationError' type: array title: Detail title: HTTPValidationError refIdentifier: '#/components/schemas/HTTPValidationError' examples: example: value: detail: - loc: - msg: type: description: Validation Error deprecated: false type: path components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ``` -------------------------------- ### Get Job API Endpoint Source: https://docs.infera.org/api-reference/endpoint/get-job This endpoint retrieves job information from the Infera API. It is a GET request to '/worker/get_job' and expects a successful response with JSON data. ```APIDOC paths: /worker/get_job: get: servers: - url: https://api.infera.org/ description: Infera production servers request: security: [] parameters: {} body: {} response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response deprecated: false type: path components: schemas: {} ``` -------------------------------- ### Signup User API Endpoint (OpenAPI) Source: https://docs.infera.org/api-reference/endpoint/signup This OpenAPI specification details the POST /signup_user endpoint for creating new user accounts. It outlines the request body schema, including the required email field, and describes the possible success (200) and error (422) responses. ```APIDOC paths: path: /signup_user method: post servers: - url: https://api.infera.org/ description: Infera production servers request: security: [] parameters: path: {} query: {} header: {} cookie: {} body: application/json: schemaArray: - type: object properties: email: allOf: - type: string format: email title: Email required: true title: SignupRequest refIdentifier: '#/components/schemas/SignupRequest' requiredProperties: - email examples: example: value: email: jsmith@example.com response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response '422': application/json: schemaArray: - type: object properties: detail: allOf: - items: $ref: '#/components/schemas/ValidationError' type: array title: Detail title: HTTPValidationError refIdentifier: '#/components/schemas/HTTPValidationError' examples: example: value: detail: - loc: - msg: type: description: Validation Error deprecated: false type: path components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ``` -------------------------------- ### OpenAPI: GET /get_points Source: https://docs.infera.org/api-reference/endpoint/get-points Defines the GET /get_points API endpoint for the Infera service. It specifies request parameters, including a required 'node_name', and response structures for successful retrieval (200) and validation errors (422). ```yaml paths: path: /get_points method: get servers: - url: https://api.infera.org/ description: Infera production servers request: security: [] parameters: path: {} query: node_name: schema: - type: string required: true title: Node Name header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response '422': application/json: schemaArray: - type: object properties: detail: allOf: - items: $ref: '#/components/schemas/ValidationError' type: array title: Detail title: HTTPValidationError refIdentifier: '#/components/schemas/HTTPValidationError' examples: example: value: detail: - loc: - msg: type: description: Validation Error deprecated: false type: path components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ``` -------------------------------- ### Fast Connect WebSocket Initialization Source: https://discord.com/invite/infera Implements a 'fast connect' mechanism for establishing a WebSocket connection to the gateway. It checks for existing tokens and browser capabilities to determine the optimal encoding (ETF or JSON) and compression method (zstd-stream or zlib-stream). ```javascript !function(){ if (null != window.WebSocket && function(n) { try { var o = localStorage.getItem(n); if (null == o) return null; return JSON.parse(o); } catch (e) { return null; } }("token") && !window.__OVERLAY__) { var n = null != window.DiscordNative || null != window.require ? "etf" : "json", o = window.GLOBAL_ENV.GATEWAY_ENDPOINT + "/?encoding=" + n + "&v=" + window.GLOBAL_ENV.API_VERSION; null != window.DiscordNative && void 0 !== window.Uint8Array && void 0 !== window.TextDecoder ? o += "&compress=zstd-stream" : void 0 !== window.Uint8Array && (o += "&compress=zlib-stream"), console.log("[FAST CONNECT] " + o + ", encoding: " + n + ", version: " + window.GLOBAL_ENV.API_VERSION); var e = new WebSocket(o); e.binaryType = "arraybuffer"; var i = Date.now(), r = { open: !1, identify: !1, gateway: o, messages: [] }; e.onopen = function() { console.log("[FAST CONNECT] connected in " + (Date.now() - i) + "ms"), r.open = !0 }, e.onclose = e.onerror = function() { window._ws = null }, e.onmessage = function(n) { r.messages.push(n) }, window._ws = { ws: e, state: r } } }(); ``` -------------------------------- ### Chat Completions API Endpoint Source: https://docs.infera.org/api-reference/endpoint/chat-completions Documentation for the POST /chat/completions endpoint. It details the request body schema (model, messages, max_tokens, temperature), response schemas (successful and validation errors), security requirements, and provides usage examples. Dependencies include the OpenAPI specification and defined schemas like InputMessage and ValidationError. ```APIDOC ````yaml post /chat/completions paths: path: /chat/completions method: post servers: - url: https://api.infera.org/ description: Infera production servers request: security: - title: APIKeyHeader parameters: query: {} header: api_key: type: apiKey cookie: {} parameters: {} body: application/json: schemaArray: - type: object properties: model: allOf: - type: string title: Model messages: allOf: - items: $ref: '#/components/schemas/InputMessage' type: array title: Messages max_tokens: allOf: - type: integer title: Max Tokens temperature: allOf: - type: number title: Temperature request_timeout_time: allOf: - anyOf: - type: integer - type: 'null' title: Request Timeout Time default: 240 required: true title: ChatCompletionsRequest refIdentifier: '#/components/schemas/ChatCompletionsRequest' requiredProperties: - model - messages - max_tokens - temperature examples: example: value: model: messages: - role: content: max_tokens: 123 temperature: 123 request_timeout_time: 123 response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response '422': application/json: schemaArray: - type: object properties: detail: allOf: - items: $ref: '#/components/schemas/ValidationError' type: array title: Detail title: HTTPValidationError refIdentifier: '#/components/schemas/HTTPValidationError' examples: example: value: detail: - loc: - msg: type: description: Validation Error deprecated: false type: path components: schemas: InputMessage: properties: role: type: string title: Role content: type: string title: Content type: object required: - role - content title: InputMessage ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ```` ``` -------------------------------- ### Cloudflare Challenge Platform Script Injection Source: https://discord.com/invite/infera Injects a script into the page to handle Cloudflare's challenge platform. This involves creating an iframe, setting its content to include nonce-protected scripts for JavaScript-based challenges, and appending it to the document head. ```javascript (function() { function c() { var b = a.contentDocument || a.contentWindow.document; if (b) { var d = b.createElement('script'); d.nonce = 'MTU5LDIzOSwyMzUsMTk0LDM1LDgwLDE5LDI1Mw=='; d.innerHTML = "window.__CF$cv$params={r:'9648cd881b1ed471',t:'MTc1MzQxNjU3Ny4wMDAwMDA='}; var a = document.createElement('script'); a.nonce = 'MTU5LDIzOSwyMzUsMTk0LDM1LDgwLDE5LDI1Mw=='; a.src = '/cdn-cgi/challenge-platform/scripts/jsd/main.js'; document.getElementsByTagName('head')[0].appendChild(a);"; b.getElementsByTagName('head')[0].appendChild(d); } } if (document.body) { var a = document.createElement('iframe'); a.height = 1; a.width = 1; a.style.position = 'absolute'; a.style.top = 0; a.style.left = 0; a.style.border = 'none'; a.style.visibility = 'hidden'; document.body.appendChild(a); if ('loading' !== document.readyState) c(); else if (window.addEventListener) document.addEventListener('DOMContentLoaded', c); else { var e = document.onreadystatechange || function() {}; document.onreadystatechange = function(b) { e(b); 'loading' !== document.readyState && (document.onreadystatechange = e, c()); }; } } })(); ``` -------------------------------- ### Get Node Job Count OpenAPI Endpoint Source: https://docs.infera.org/api-reference/endpoint/get-node-job-count This OpenAPI specification defines the GET /node_job_count endpoint. It allows clients to query the number of jobs associated with a specific node by providing the node's name as a query parameter. The endpoint returns a successful response with the job count or a validation error if the input is malformed. ```APIDOC paths: path: /node_job_count method: get servers: - url: https://api.infera.org/ description: Infera production servers request: security: [] parameters: path: {} query: node_name: schema: - type: string required: true title: Node Name header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: any examples: example: value: description: Successful Response '422': application/json: schemaArray: - type: object properties: detail: allOf: - items: $ref: '#/components/schemas/ValidationError' type: array title: Detail title: HTTPValidationError refIdentifier: '#/components/schemas/HTTPValidationError' examples: example: value: detail: - loc: - msg: type: description: Validation Error deprecated: false type: path components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ```