[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [NASA media files](https://spiral.ai/integrations/opencode/nasa-media-files)

# How to Use NASA media files in opencode

Returns the file manifest for a specific NASA image, video, or audio asset, including available download renditions. Use it when you have selected an item and need its files rather than search matches.

|  |  |
| --- | --- |
| Model | NASA media files |
| Available through | Alexandria |
| Category | News & Media |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with NASA media files in opencode

- Use NASA media files for as11-40-5874 and add its returned download links to the project's Apollo 11 page.
- Use NASA media files for as11-40-5874 and build a download selector from the returned manifest without inventing unavailable sizes.
- Use NASA media files to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from NASA media files and tell me what changed since last week.
- Check NASA media files and summarize what you find in three bullet points.

## How to set up NASA media files in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run NASA media files**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "images-nasa-gov/media/get_asset",
    "input": {
      "url": "<url>"
    }
  }'
```

Then paste one of the prompts above: opencode finds NASA media files on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## NASA media files tools and prices

- [NASA Image and Video Library · Get asset](https://spiral.ai/tools/alexandria/images-nasa-gov/media/get_asset) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| url |  | — | images.nasa.gov/details/<id> page, or an images-api.nasa.gov/asset/<id> or images-assets.nasa.gov URL. |
| nasa_id |  | — | NASA id from search_media, e.g. as11-40-5874 (spaces allowed). |

## What can you do with NASA media files in opencode?

Build a NASA media browser that pairs searchable mission records with downloadable files. Use descriptions for selection and asset manifests for the available renditions.

### Illustrate a space history lesson

Find Apollo 11 material, select records using their descriptions, and retrieve available files for a classroom presentation.

### Prepare documentary research

Shortlist mission images, video, and audio, then collect download links for an editor to review alongside the source descriptions.

### Build a mission anniversary exhibit

Research Space Shuttle or Apollo material and retrieve image renditions for exhibit planning, with source credits kept beside each selection.

### Source illustrations for science reporting

Find media related to a mission covered in an article, review its description, and obtain the available files for editorial selection.

### Create a browsable NASA media collection

Use search records to organize a subject collection and asset manifests to offer available downloads for selected items.

### Refresh a museum's media shortlist

Repeat searches for Artemis or Mars exploration, identify previously unseen records, and retrieve their file manifests for curatorial review.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## NASA media files in other agents

- [Amp](https://spiral.ai/integrations/amp/nasa-media-files)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/nasa-media-files)
- [Claude](https://spiral.ai/integrations/claude-desktop/nasa-media-files)
- [Claude Code](https://spiral.ai/integrations/claude-code/nasa-media-files)
- [Cline](https://spiral.ai/integrations/cline/nasa-media-files)
- [Codex](https://spiral.ai/integrations/codex/nasa-media-files)
- [Cursor](https://spiral.ai/integrations/cursor/nasa-media-files)
- [Devin](https://spiral.ai/integrations/devin/nasa-media-files)
- [dots](https://spiral.ai/integrations/dots/nasa-media-files)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/nasa-media-files)
- [Gemini](https://spiral.ai/integrations/gemini/nasa-media-files)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/nasa-media-files)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/nasa-media-files)
- [goose](https://spiral.ai/integrations/goose/nasa-media-files)
- [Grok](https://spiral.ai/integrations/grok/nasa-media-files)
- [Grok Build](https://spiral.ai/integrations/grok-build/nasa-media-files)
- [Hermes](https://spiral.ai/integrations/hermes/nasa-media-files)
- [Instinct](https://spiral.ai/integrations/instinct/nasa-media-files)
- [Manus](https://spiral.ai/integrations/manus/nasa-media-files)
- [Muse](https://spiral.ai/integrations/muse/nasa-media-files)
- [Muse Code](https://spiral.ai/integrations/muse-code/nasa-media-files)
- [n8n](https://spiral.ai/integrations/n8n/nasa-media-files)
- [Notion](https://spiral.ai/integrations/notion/nasa-media-files)
- [OpenClaw](https://spiral.ai/integrations/openclaw/nasa-media-files)
- [Perplexity](https://spiral.ai/integrations/perplexity/nasa-media-files)
- [Raycast](https://spiral.ai/integrations/raycast/nasa-media-files)
- [VS Code](https://spiral.ai/integrations/vscode/nasa-media-files)
- [Windsurf](https://spiral.ai/integrations/windsurf/nasa-media-files)
- [Zapier](https://spiral.ai/integrations/zapier/nasa-media-files)

## More opencode guides

- [NASA 3D model search](https://spiral.ai/integrations/opencode/nasa-3d-model-search)
- [NASA media search](https://spiral.ai/integrations/opencode/nasa-media-search)
- [NASA 3D model details](https://spiral.ai/integrations/opencode/nasa-3d-model-details)
- [NHPR article](https://spiral.ai/integrations/opencode/nhpr-article)
- [MIT Sloan business articles](https://spiral.ai/integrations/opencode/mit-sloan-business-articles)
- [NHPR latest stories](https://spiral.ai/integrations/opencode/nhpr-latest-stories)

## Questions about NASA media files in opencode

**Can opencode use NASA media files?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run NASA media files like any built-in tool.

**How much does NASA media files cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use NASA media files in opencode?**

No. Spiral runs NASA media files on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up NASA media files in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while NASA media files runs?**

NASA media files runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does the library contain every NASA image, video, and recording?**

No. NASA explicitly describes it as a selection of publicly available material rather than a comprehensive archive, so an absent item does not establish that NASA has no such media.

**Are additions always newly created media?**

No. NASA continually adds both new and archival material, so a newly added item can document a much older event.

**Are downloads limited to preview images?**

No. The library offers multiple download resolutions, and NASA's documented asset manifest includes an original image alongside smaller renditions.

**Can schools and publishers reuse NASA media?**

NASA generally permits educational and informational use under its media guidelines. Its content generally is not subject to copyright in the United States, but that statement is not a blanket clearance for every item.

**Is everything in the library NASA-owned material?**

No. NASA sometimes publishes third-party copyrighted material and identifies the copyright holder. Reusing those items requires permission from that holder.

