Skip to main content

Developer Documentation

Submit Python scripts to GPU nodes and get results back. Per-second billing, no minimum commitment.

Per-second billing Docker isolated EU-hosted

Quick Start

Submit your first GPU job in under 2 minutes. Get your API key from the dashboard.

1. Install the SDK

pip install ghostnexus

2. Submit a job

import ghostnexus

client = ghostnexus.Client(api_key="gn_live_...")

# Submit a job
job = client.run("train.py", task_name="Mistral-7B LoRA")

# Wait for completion
result = job.wait(timeout=7200)

print(result.output)
print(f"Duration: {result.duration_seconds:.0f}s")
print(f"Cost: ${result.cost_credits:.4f}")

Authentication

All API requests require an API key passed via the x-api-key header.

x-api-key: gn_live_<your-api-key>
Your API key is available in the dashboard under "API Key". Never expose it in client-side code.

Submit a Job

Jobs are Python scripts submitted as text. They run in a Docker container with GPU access.

curl -X POST https://ghostnexus.net/api/jobs \
  -H "x-api-key: gn_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "task_name": "my-job",
    "script_content": "print(\"Hello from GPU\")"
  }'

# Response
{
  "job_id": "a3f8c2d1-...",
  "status": "queued",
  "provider_id": "...",
  "task_name": "my-job"
}

Request body

FieldTypeDescription
task_namestringHuman-readable job name for your dashboard
script_contentstringPython script source code to execute on the GPU

Job Status

GET /api/jobs/{job_id}

{
  "job_id": "a3f8c2d1-...",
  "task_name": "my-job",
  "status": "completed",  // queued | running | completed | failed
  "duration_seconds": 142.3,
  "cost_credits": 0.0198,
  "output_logs": "Hello from GPU\n..."
}

Python SDK

MethodDescription
Client(api_key=...)Initialize the SDK client
client.run(script, task_name=...)Submit a job and return a Job object
job.wait(timeout=3600)Block until job completes, raise on timeout
job.status()Poll job status without blocking
result.outputstdout from the script
result.cost_creditsCredits consumed (in USD)
result.duration_secondsWall-clock execution time

Provider Node

Have a GPU? Earn passive income by connecting it to the network. Jobs run in isolated Docker containers — your system stays safe.

pip install ghostnexus-node

ghostnexus-node start --api-key gn_live_...
Full provider setup guide

Pricing

GPU$/hr$/sec
RTX 4070 / RTX 3080$0.30$0.000083
RTX 4090 / RTX 3090 Ti$0.50$0.000139
A100 (40 GB)$2.20$0.000611
H100 (80 GB)$3.50$0.000972

Credits are billed per second. No minimum commitment. Full pricing details →

Ready to start?

Create an account and get $15 free compute credits with code WELCOME15.

Get Free Credits