Documentation
Developer Resources
Everything you need to build with STP Networks. APIs, SDKs, tutorials, and guides to get you started.
Quick Start
Get up and running with STP Networks in minutes
- Authentication
- Your First API Call
- Deploy Your First Model
- Basic Examples
API Reference
Complete API documentation with examples
- REST API
- GraphQL API
- WebSocket API
- Rate Limits
SDKs & Libraries
Official SDKs for popular programming languages
- Python SDK
- Node.js SDK
- Go SDK
- Java SDK
Infrastructure
Deploy and manage your AI infrastructure
- GPU Instances
- Model Deployment
- Scaling & Load Balancing
- Monitoring & Logging
Security & Compliance
Security best practices and compliance guides
- Authentication
- Data Encryption
- POPIA Compliance
- Security Audit
Tutorials
Step-by-step tutorials for common use cases
- Building a Chatbot
- Fine-tuning Models
- Vector Search
- Real-time Inference
Code Examples
Get started quickly with these code examples
Deploy a Model
curlcurl -X POST https://api.stpnetworks.co.za/v1/models/deploy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-llama-model",
"model_id": "llama-2-7b",
"instance_type": "gpu.large",
"replicas": 2,
"environment": {
"MAX_TOKENS": "2048",
"TEMPERATURE": "0.7"
}
}'Make a Prediction
Node.jsconst { STPClient } = require('@stpnetworks/sdk');
const client = new STPClient({
apiKey: process.env.STP_API_KEY,
region: 'africa-south'
});
async function predict() {
const response = await client.predict({
model: 'gpt-4',
prompt: 'Explain quantum computing in simple terms',
max_tokens: 150,
temperature: 0.7
});
console.log(response.choices[0].text);
}
predict();Fine-tune a Model
Pythonfrom stpnetworks import STPClient
client = STPClient(api_key="your-api-key")
# Upload training data
training_data = client.data.upload(
file_path="./training_data.jsonl",
format="jsonl"
)
# Start fine-tuning
job = client.fine_tuning.create(
model="llama-2-7b",
training_data=training_data.id,
hyperparameters={
"learning_rate": 2e-5,
"batch_size": 4,
"epochs": 3
}
)
# Monitor progress
print(f"Fine-tuning job started: {job.id}")
print(f"Status: {job.status}")Need Help Getting Started?
Our developer support team is here to help you succeed. Get personalized assistance with integration, best practices, and optimization.
24/7 developer support
Integration assistance
Performance optimization
Best practices guidance
Get Developer Support
Join our developer community and get help from our team and other developers.