# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Cursor2API-Go
spec:
    description: A Go service that converts Cursor Web into OpenAI chat/completions compatible API
    icon: https://raw.githubusercontent.com/libaxuan/cursor2api-go/main/docs/images/home.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: What domain do you want for your Cursor2API service?
        - key: API_KEY
          type: STRING
          name: API Key
          description: API authentication key for the service (default is 0000)
        - key: MODELS
          type: STRING
          name: Models
          description: 'Comma-separated base model list (default: claude-sonnet-4.6)'
    tags:
        - Tool
        - AI
    readme: "# Cursor2API-Go\n\nA Go service that converts Cursor Web into an OpenAI `chat/completions` compatible API.\n\n## Features\n- \U0001F504 **API Compatible**: OpenAI `chat/completions` interface compatible\n- ⚡ **High Performance**: Low latency response\n- \U0001F510 **Secure Auth**: API Key authentication support\n- \U0001F310 **Model Derivation**: Automatically exposes `*-thinking` models\n- \U0001F9F0 **Tool Calls**: Supports `tools` / `tool_choice` / `tool_calls`\n- \U0001F6E1️ **Error Handling**: Comprehensive error handling\n- \U0001F4CA **Health Check**: Built-in health check endpoint\n\n## Configuration\nSet environment variables after deployment:\n- `API_KEY`: API authentication key (default: 0000)\n- `MODELS`: Base model list, comma-separated (default: claude-sonnet-4.6)\n- `DEBUG`: Enable debug mode (default: false)\n- `TIMEOUT`: Request timeout in seconds (default: 60)"
    services:
        - name: cursor2api-go
          template: GIT
          spec:
            id: cursor2api-go
            source:
                source: GITHUB
                repo: 1066838979
                branch: main
            ports:
                - id: web
                  port: 8002
                  type: HTTP
            env:
                API_KEY:
                    default: ${API_KEY}
                DEBUG:
                    default: "false"
                MODELS:
                    default: ${MODELS}
                PORT:
                    default: "8002"
                TIMEOUT:
                    default: "60"
          domainKey: PUBLIC_DOMAIN
