Install the SDK
- TypeScript
- Python
- Go
- Rust
Quick Example
- TypeScript
- Python
- Go
- Rust
Learn how to integrate the Edgee SDK to interact with Edgee services.
npm install edgee
pip install edgee
go get github.com/edgee-ai/go-sdk
cargo install edgee
import Edgee from 'edgee';
const edgee = new Edgee(process.env.EDGEE_API_KEY);
const response = await edgee.send({
model: 'gpt-4o',
input: 'What is the capital of France?',
});
console.log(response.content);
// "The capital of France is Paris."
from edgee import Edgee
edgee = Edgee(api_key=os.environ["EDGEE_API_KEY"])
response = edgee.send(
model="gpt-4o",
input="What is the capital of France?"
)
print(response.content)
# "The capital of France is Paris."
package main
import (
"fmt"
"os"
"github.com/edgee-ai/go-sdk"
)
func main() {
client := edgee.NewClient(os.Getenv("EDGEE_API_KEY"))
response, _ := client.Send(edgee.SendParams{
Model: "gpt-4o",
Input: "What is the capital of France?",
})
fmt.Println(response.Content)
// "The capital of France is Paris."
}
use edgee::Edgee;
let api_key = std::env::var("EDGEE_API_KEY").expect("EDGEE_API_KEY not set");
let edgee = Edgee::new(api_key);
let response = edgee.send(edgee::SendRequest {
model: "gpt-4o".to_string(),
input: "What is the capital of France?".to_string(),
});
println!("{}", response.output_text);
// "The capital of France is Paris."
Was this page helpful?