Home
Optional sponsor$100 in API credits

OpenAI

OpenAI

OpenAI makes the GPT models and the OpenAI API for text, images, voice and realtime. Every attendee gets $100 in API credits. Add your key to Capy and your threads run on OpenAI models on those credits.

Hackathon perks:$100 in OpenAI API credits for every attendee

Good to know

  • Your Capy threads can run on OpenAI models, paid from your $100 in credits.
  • The same key can call the OpenAI API from your app, through a Convex action.

Get started

  1. 1

    Claim your $100 in credits

    Each attendee gets a personal one-time link, in the form platform.openai.com/p/…, to $100 in OpenAI API credits. Open it while signed in to your OpenAI platform account and follow the prompt to add the credits. Then create your API key in that same organization.

    How you get your link: To be confirmed

  2. 2

    Create an API key

    Sign in at platform.openai.com, select the organization that holds the credits, and create a key under API keys.

    platform.openai.com/api-keys
  3. 3

    Add the key to Capy

    In Capy, open Settings → Models and click the add button next to Your connections. Search for OpenAI under API keys and paste the key. Check access lists the models the key can run.

    Capy docs: connections
  4. 4

    Pick an OpenAI model

    In a thread's model picker, choose an OpenAI model, such as GPT-6.1 Sol, or GPT-6 Luna for cheaper runs. A thread uses the first connection that covers its model, so these models now run on your credits. Capy doesn't charge for the tokens your key serves.

Ask Capy for an AI feature
Add an AI feature to the app with the OpenAI API. Call it from a Convex action that reads OPENAI_API_KEY from the Convex environment, use the Responses API from the openai npm package, and show the result in the app.
Use OpenAI in your appCall the OpenAI API from a Convex action, so the key stays on the server.
  1. 1

    Install the SDK and set the key

    Run these in your Convex project. The key lives in the Convex environment, never in the app.

    npm install openai
    npx convex env set OPENAI_API_KEY your_api_key
  2. 2

    Call it from an action

    convex/ai.ts
    "use node";
    import { action } from "./_generated/server";
    import { v } from "convex/values";
    import OpenAI from "openai";
    
    const openai = new OpenAI();
    
    export const reply = action({
      args: { prompt: v.string() },
      handler: async (_ctx, args) => {
        const response = await openai.responses.create({
          model: "gpt-6-astra",
          input: args.prompt,
        });
        return response.output_text;
      },
    });
    OpenAI quickstart
NextCapy