Docs/API/Export
Portable profiles

Export API

Export taste profiles for offline use, backup, or integration with external systems. Choose between full exports or minimal inference-only data.

Export Formats

Full Export (json)

Complete profile data including all branches, versions, exemplars, comparisons, and computed snapshots. Ideal for backup or migration.

?format=json

Minimal Export (minimal)

Only the essential data needed for inference: latent scores, embedding centroid, and prompt summary. Smaller payload for edge deployment.

?format=minimal
GET/v1/profiles/:id/export

Export a taste profile in JSON format. By default, exports the full profile data.

Query Parameters

ParameterTypeDescription
formatstringOptional. Either "json" (default) or "minimal"
Request (Full Export)
curl https://api.commandAGI.com/v1/profiles/prof_abc123/export \
  -H "Authorization: Bearer YOUR_API_KEY"

# Or explicitly:
curl "https://api.commandAGI.com/v1/profiles/prof_abc123/export?format=json" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response (Full Export)
{
  "id": "prof_abc123",
  "projectId": "proj_xyz789",
  "name": "cinematic-look",
  "seed": "Dark, moody cinematography",
  "profileData": {
    "branches": [
      {
        "id": "main",
        "name": "main",
        "description": "Main branch",
        "headVersionId": "v_456",
        "createdAt": "2024-01-15T10:30:00Z"
      }
    ],
    "versions": [
      {
        "id": "v_456",
        "branchId": "main",
        "message": "Added 20 comparisons",
        "snapshot": {...},
        "createdAt": "2024-01-20T14:22:00Z"
      }
    ],
    "currentBranchId": "main",
    "budget": {
      "questions": { "used": 15, "total": 20 },
      "labels": { "used": 42, "total": 50 },
      "comparisons": { "used": 87, "total": 100 }
    }
  },
  "effectiveSnapshot": {
    "constraints": [
      {
        "id": "c_1",
        "category": "mood",
        "question": "What mood should the image evoke?",
        "answer": "Mysterious and contemplative"
      }
    ],
    "exemplars": [
      {
        "id": "e_1",
        "label": "good",
        "imageData": "https://cdn.commandAGI.com/...",
        "source": "upload"
      }
    ],
    "comparisons": [
      {
        "id": "cmp_1",
        "frameA": "frm_1",
        "frameB": "frm_2",
        "winner": "frm_1"
      }
    ],
    "latentScores": {
      "frm_1": 0.823,
      "frm_2": 0.456,
      "frm_3": 0.912
    },
    "promptSummary": "Dark, cinematic imagery with high contrast...",
    "embeddingCentroid": [0.12, -0.34, 0.56, ...]
  },
  "metadata": {
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-20T14:22:00Z",
    "exportedAt": "2024-01-21T09:00:00Z",
    "version": "1.0"
  }
}

Minimal Export

The minimal format includes only the data required for inference, significantly reducing payload size. Ideal for edge deployment or embedding in applications.

Request (Minimal Export)
curl "https://api.commandAGI.com/v1/profiles/prof_abc123/export?format=minimal" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response (Minimal Export)
{
  "id": "prof_abc123",
  "name": "cinematic-look",
  "seed": "Dark, moody cinematography",
  "snapshot": {
    "latentScores": {
      "frm_1": 0.823,
      "frm_2": 0.456,
      "frm_3": 0.912
    },
    "embeddingCentroid": [0.12, -0.34, 0.56, ...],
    "promptSummary": "Dark, cinematic imagery with high contrast...",
    "exemplarCount": 42,
    "comparisonCount": 87,
    "constraintCount": 15
  },
  "exportedAt": "2024-01-21T09:00:00Z"
}

Response Fields

Full Export

FieldDescription
profileDataComplete profile structure with branches, versions, and budget
effectiveSnapshotAll constraints, exemplars, comparisons, and computed data
metadataExport metadata including timestamps and version

Minimal Export

FieldDescription
snapshot.latentScoresBradley-Terry rankings for all exemplars
snapshot.embeddingCentroidAverage embedding vector for similarity scoring
snapshot.promptSummaryNatural language description of the taste
snapshot.*CountCounts of exemplars, comparisons, and constraints

Use Cases

Offline Evaluation

Export the minimal format and use the embedding centroid for local similarity calculations without API calls.

Backup and Versioning

Use full exports to create point-in-time backups of your taste profiles. Store in version control alongside your codebase.

Edge Deployment

Embed minimal exports in edge functions for low-latency taste scoring without round-trips to the API.

Cross-Platform Integration

Export profiles to integrate with external ML pipelines, analytics tools, or custom applications.

Implementation Tips

  • Cache exports: Export data changes only when you commit new versions. Cache the export and refresh on version changes.
  • Use minimal for inference: The full export can be large. Use minimal format when you only need to score content.
  • Store the centroid: The embedding centroid is the most valuable data for offline scoring. A simple cosine similarity check provides good results.