- Getting Started
- Quickstart
Getting Started
Quickstart
Get started with Backboard API in under 5 minutes
New to Backboard? Read Architecture first for how assistants, threads, messages, and runs fit together.
βPrerequisites
- A Backboard account with an API key
- Python 3.7+ or Node.js 14+ (or any HTTP client)
βStep 1: Get Your API Key
- Log in to Backboard Dashboard
- Navigate to Settings β API Keys
- Create a new API key and copy it
βStep 2: Install the SDK (Optional)
If you prefer using our SDK instead of raw HTTP requests, install it:
Python
JavaScript
TypeScript
pip install backboard-sdk
βStep 3.1: Send a Message (Non-Streaming)
Send a message and wait for the complete response. A thread and assistant are automatically created for you. The snippets below set llm_provider and model_name together (OpenRouter and moonshotai/kimi-k2.6); omit them to use the API defaults (openai / gpt-4o).
Python SDK
JavaScript SDK
TypeScript SDK
REST API
import asyncio
from backboard import BackboardClient
async def main():
client = BackboardClient(api_key="YOUR_API_KEY")
response = await client.send_message(
"What is the capital of France?",
llm_provider="openrouter",
model_name="moonshotai/kimi-k2.6",
stream=False,
)
print(f"Assistant: {response.content}")
print(f"Thread ID: {response.thread_id}")
print(f"Assistant ID: {response.assistant_id}")
asyncio.run(main())
βStep 3.2: Send a Message (Streaming)
Stream the response in real-time as itβs generated:
Python SDK
JavaScript SDK
TypeScript SDK
REST API
import asyncio
from backboard import BackboardClient
async def main():
client = BackboardClient(api_key="YOUR_API_KEY")
full_content = ""
async for chunk in await client.send_message(
"What is the capital of France?",
llm_provider="openrouter",
model_name="moonshotai/kimi-k2.6",
stream=True,
):
if chunk.get("type") == "content_streaming":
content_piece = chunk.get("content", "")
full_content += content_piece
print(content_piece, end="", flush=True)
elif chunk.get("type") == "run_ended":
break
print(f"\nFull response: {full_content}")
asyncio.run(main())
βStep 4.1: Continue the Conversation (Non-Streaming)
Pass the thread_id from the first response to continue the conversation in the same thread:
Python SDK
JavaScript SDK
TypeScript SDK
REST API
response = await client.send_message(
"What is its population?",
thread_id=response.thread_id,
llm_provider="openrouter",
model_name="moonshotai/kimi-k2.6",
stream=False,
)
print(f"Assistant: {response.content}") # Will know you're asking about Paris
βStep 4.2: Continue the Conversation (Streaming)
Pass the thread_id from the first response to continue the conversation in the same thread:
Python SDK
JavaScript SDK
TypeScript SDK
REST API
full_content = ""
async for chunk in await client.send_message(
"What is its population?",
thread_id=response.thread_id,
llm_provider="openrouter",
model_name="moonshotai/kimi-k2.6",
stream=True,
):
if chunk.get("type") == "content_streaming":
content_piece = chunk.get("content", "")
full_content += content_piece
print(content_piece, end="", flush=True)
elif chunk.get("type") == "run_ended":
break
print(f"\nAssistant: {full_content}") # Will know you're asking about Paris