HackIndia Logo
HackathonsNewsSkillsGrowth
HackIndia LogoContact: +91 9910125804

General

  • Companies
  • Colleges
  • Board of Advisors
  • Brand Ambassadors
  • FAQ
  • Contact
  • Report a Bug

Hackathons

  • Upcoming Hackathons
  • Judges
  • Mentors
  • Partners
  • Participating Colleges
  • Testimonials

Resources

  • About Us
  • Branding
  • Latest News
  • Growth
  • Skills
  • Builders
  • Ecosystem
  • Forum
  • Ideas
  • Prompt Optimizer
  • Games

© 2026 HackIndia. All rights reserved.

Privacy PolicyTerms of ServiceCode of ConductSitemap

Build 2.139 · 05 Nov 2026, 10:27 UTC

    HackIndia
    HackathonsNewsInternshipsSkillsGrowthPro Perks
    Working towardsLLM APIs
    0%

    0 of 9 steps done · +100 XP · +50 SHARP when it is yours

    1. 1Call a model safely5 min · +10 XP · +5 SHARP
    2. 2Design messages that behave5 min · +10 XP · +5 SHARP
    3. 3Stream replies to the UI5 min · +10 XP · +5 SHARP
    4. 4Return JSON your app can use4 min · +10 XP · +5 SHARP
    5. 5Handle failures and limits5 min · +10 XP · +5 SHARP
    6. 6Track tokens and cost4 min · +10 XP · +5 SHARP
    7. 7Ship the repo proof4 min · +10 XP · +5 SHARP
    8. The check10 questions, 7 to pass · +10 SHARP
    9. Hand in the taskA project that uses the skill
    10. Skill and certificate+100 XP · +50 SHARP
    Lesson 7 of 7 4 min

    LLM APIs

    Ship the repo proof

    • +10 XP for this lesson
    • +100 XP when the skill is proved
    • Nobody here has proved it yet
    In 30 seconds
    • Turn your AI feature into repo proof an evaluator can run.
    • Show server-side OpenAI use without leaking your API key.
    Write a README that proves setup, streaming or JSON, and error handling.
    Key point

    Proof beats claims

    Your repo should make one thing obvious: the AI call happens from a server route, not from the browser. The README and file names should help a reviewer verify this in two minutes.

    Use the Responses API for new text generation work. Older tutorials may show Chat Completions or frontend calls, but your proof should use the current backend route pattern.

    Your to-do

    What reviewers check

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    README proof block

    Add a small proof section near the top of your README. This helps internship reviewers and HackIndia evaluators find the important parts fast.

    AI feature proof
    
    Feature: AI study-plan generator
    
    Backend route: app/api/plan/route.ts
    OpenAI API used: Responses API
    Key handling: reads process.env.OPENAI_API_KEY on the server only
    Output mode: Structured Outputs with json_schema and strict true
    Error handling: returns safe messages for 429 and temporary server errors
    
    Run locally:
    1. Copy .env.example to .env.local
    2. Add OPENAI_API_KEY=your_key_here
    3. Install dependencies
    4. Start the dev server
    5. Open /dashboard and generate a plan
    
    Do not put your OpenAI API key in browser code, mobile code, screenshots, or commits.
    Example

    Env example

    Commit an example env file, not the real one. This shows the required variable without leaking secrets.

    # .env.example
    OPENAI_API_KEY=replace_with_your_openai_key
    Common mistake

    Common repo leaks

    Do not commit .env, .env.local, terminal screenshots with keys, or copied code where the key is hardcoded. OpenAI recommends using the OPENAI_API_KEY environment variable so code can be shared safely.

    Also avoid a demo where the browser calls OpenAI directly. API keys should stay on your backend server.

    Tip

    Use AI carefully

    Ask ChatGPT, Gemini, or Claude to review your README before submission. Paste only code structure and fake env values, not your real key.

    Prompt it like this: “Check if this repo README proves safe OpenAI backend integration. Flag missing setup steps, unclear route names, leaked secrets, and missing error handling.” Then verify every suggestion yourself.

    Your to-do

    Final repo pass

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Sources

    Checked against the current documentation on 21 September 2026.

    • OpenAI text generation guide · developers.openai.com
    • OpenAI Structured Outputs guide · developers.openai.com
    • OpenAI Best Practices for API Key Safety · help.openai.com
    • OpenAI error codes guide · developers.openai.com

    Quick check

    0 of 2 right
    1.Your React page calls OpenAI directly with an API key hidden in a frontend env variable. What should you change before submission?
    2.What should your README prove for this track’s final task?

    Answer the quick check to finish this lesson.

    ← Lesson 6
    Working towards
    LLM APIs +100 XP

    0 of 7 lessons done · proved by a project that uses the skill

    See the track