Existing SDKs
Point your SDK at https://sporelabs.dev/v1 and use your SporeLabs key.
| API | Endpoint |
|---|---|
| Chat Completions | POST /v1/chat/completions |
| Responses | POST /v1/responses |
| Anthropic Messages | POST /v1/messages |
OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(
base_url="https://sporelabs.dev/v1",
api_key=os.environ["SPORELABS_API_KEY"],
)
reply = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.choices[0].message.content)
Anthropic SDK
import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://sporelabs.dev",
api_key=os.environ["SPORELABS_API_KEY"],
)
reply = client.messages.create(
model="auto",
max_tokens=256,
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.content[0].text)
For Responses, send store: false and include the full conversation each time.