Build your first AI Studio integration

View as Markdown

This guide walks you through integrating AISquare into your application.

By the end, you will:

  • Fetch data from an AI Studio
  • Display experiences and resources
  • Build a basic content feed

What you are building

You will create a simple flow that:

  1. Selects an AI Studio
  2. Fetches its experiences
  3. Displays resources to users

Step 1: Choose a studio

Every AI Studio is identified by a unique URL.

Example:

ai-research-studio

You will use this value in all requests.


Step 2: Fetch experiences

Use the flattened experiences endpoint to retrieve content.

Endpoint

POST /api/v1/aistudios/experiences/flattened/

Example request

$curl -X POST https://api.aisquare.com/api/v1/aistudios/experiences/flattened/ \
> -H "Content-Type: application/json" \
> -d '{
> "url": "ai-research-studio"
> }'

What this returns

A list of resources across all experiences.

Each item includes:

  • Experience title
  • Resource type
  • Resource title
  • Creator details
  • Engagement metrics

Step 3: Render content

Each response item represents a single resource.

Example:

1{
2 "experience_title": "Advanced Machine Learning Models",
3 "resource_type": "AI_EXPERT",
4 "resource_title": "Image Classification Expert"
5}

Suggested UI mapping

FieldUse in UI
experience_titleSection or grouping
resource_titleCard title
resource_typeBadge or label
metricsEngagement indicators

Step 4: Add filtering and sorting

You can refine results using query parameters.

Example

POST /api/v1/aistudios/experiences/flattened/?ordering=trending&search=ai

Common options

ParameterDescription
searchSearch across content
orderingtrending, newest, popular
typeAI_EXPERT, AI_NOTE, QUEST

Step 5: Personalize the experience

To improve user experience, you can:

Continue where user left off

POST /api/v1/aistudios/continue-where-left-off/

Returns recently viewed resources.

POST /api/v1/aistudios/community-pulse/

Returns trending resources with activity insights.


Step 6: Structure your integration

A typical integration looks like:

Frontend
Your backend
AISquare API

Your backend should:

  • Handle authentication
  • Call AISquare APIs
  • Return processed data to frontend

Example flow

  1. User opens app
  2. Backend fetches experiences
  3. Frontend displays resources
  4. User interacts with content

What you’ve built

You now have:

  • A working AI Studio content feed
  • Structured resource data
  • Filtering and sorting

Next steps

Expand your integration: