This API does not support streaming yet.
Sign up to get an API key
- Create an account here
- Create an API key on the dashboard
Call the verified inference API
Run the following codefrom openai import OpenAI
client = OpenAI(
base_url="https://api.galadriel.com/v1/verified",
api_key=GALADRIEL_API_KEY
)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(f"Message: {completion.choices[0].message}")
print(f"Hash: {completion.hash}")
print(f"Signed public key: {completion.public_key}")
print(f"Signature: {completion.signature}")
print(f"Tx hash: {completion.tx_hash}")
print(f"Attestation: {completion.attestation}")
Get history of all your verified inference calls
from typing import List
import sentience
from sentience.history import GaladrielChatHistory
history: List[GaladrielChatHistory] = sentience.get_history(
galadriel_api_key="Bearer GALADRIEL_API_KEY", filter="mine"
)
Get history of all verified inference calls
from typing import List
import sentience
from sentience.history import GaladrielChatHistory
history: List[GaladrielChatHistory] = sentience.get_history(
galadriel_api_key="Bearer GALADRIEL_API_KEY"
)
Get history for one verified inference call
import sentience
from sentience.history import GaladrielChatHistory
item: GaladrielChatHistory = sentience.get_by_hash(
galadriel_api_key="Bearer GALADRIEL_API_KEY",
# example hash, replace with your own:
hash="922e575ef7f07449977001c1caaf78fb6ad8b731cd625434f9215087a6c2b39f"
)
(Optional) Open the explorer to see the history
Explorer shows all the verified inference calls done on Galadriel platform.Explorer Detailed View shows all the details for one verified inference call
What’s next?