---
title: "MakeAIVideo Device Login API: CLI Authentication"
description: "The device-code login pair (RFC 8628): start a login to get a user code, then poll until it is approved and receive the API key once. Unauthenticated."
canonical: https://makeaivideo.ai/docs/api/auth
format: markdown
generator: makeaivideo-marketing build-time HTML→MD
---

[Documentation](/docs)v1.2

Guides

-   [Overview](/docs)
-   [Quickstart](/docs/quickstart)
-   [Authentication](/docs/authentication)
-   [Webhooks](/docs/webhooks)

Integrations

-   [MCP server](/docs/mcp)
-   [Agents](/docs/agents)
-   [CLI](/docs/cli)
-   [TypeScript SDK](/docs/sdk)

API reference

-   [All endpoints](/docs/api)
-   [Introspection](/docs/api/introspection)
-   [Videos](/docs/api/videos)
-   [Scripts](/docs/api/scripts)
-   [Characters](/docs/api/characters)
-   [Voices](/docs/api/voices)
-   [Music](/docs/api/music)
-   [Uploads](/docs/api/uploads)
-   [Brand kit](/docs/api/brand-kit)
-   [Workspace](/docs/api/workspace)
-   [Ideas](/docs/api/ideas)
-   [Publishing](/docs/api/publishing)
-   [Webhooks](/docs/api/webhooks)
-   [Auth](/docs/api/auth)

API reference

# MakeAIVideo Device Login API

CLI device-code login (RFC 8628). Unauthenticated.

2 operations · https://app.makeaivideo.ai/api/v1

## When to use the Auth API

Getting a key onto a machine that has no browser, without anyone pasting a secret into a terminal or a chat window. This is the standard device-code flow from RFC 8628, the same pattern a TV app uses when it shows you a short code to type on your phone.

These two endpoints are the only unauthenticated ones in the API, for the obvious reason that a client using them does not have a key yet. Start a login, show the user the code, poll until they approve it, and receive the key once.

Start a device loginCopy

```
curl -X POST https://app.makeaivideo.ai/api/v1/auth/device \
  -H "Content-Type: application/json" \
  -d '{ "client_name": "my-laptop" }'
```

-   [POST`/auth/device`](/docs/api/auth/device-start)
-   [POST`/auth/device/token`](/docs/api/auth/device-token)

POST`/auth/device`

### Start a device login

POST https://app.makeaivideo.ai/api/v1/auth/device

#### Responses

-   `200`Codes
-   `429`Too many starts from this IP`ErrorEnvelope`

POST`/auth/device/token`

### Poll a device login; receives the key once

POST https://app.makeaivideo.ai/api/v1/auth/device/token

#### Responses

-   `200`pending | slow\_down | expired | denied | authorized

## Auth API questions

How do I log in from a machine with no browser?

Use the device-code flow. POST /auth/device returns a short user code and a URL, the person approves it in a browser anywhere, and your client polls POST /auth/device/token until it receives the key.

How often should I poll for approval?

At the interval the start response returns, not one you choose. Polling faster gets a slow\_down status telling you to back off.

Can I retrieve the API key again later?

No. The key is returned once, on the authorized response, and is never retrievable afterwards, so write it to your config or keychain immediately.

## MakeAIVideo API guides

-   [Quickstart](/docs/quickstart) — the create, poll and download loop end to end.
-   [Authentication](/docs/authentication) — what the read, write and ai scopes on this page mean.
-   [Agents](/docs/agents) — calling these endpoints from an autonomous agent.

## More MakeAIVideo documentation

Specifications

-   [RFC 8628](https://datatracker.ietf.org/doc/html/rfc8628): the device authorization grant these two endpoints implement

Get an API key

The API and MCP server use the same credits and the same balance as the app, with no separate API plan. Create a key under Settings, Advanced, API keys.

[Start 7 day free trial](https://app.makeaivideo.ai/signup?utm_source=docs&utm_medium=docs_cta&utm_content=%2Fdocs%2Fapi%2Fauth)[MakeAIVideo plans and pricing](/pricing)

7-day free trial with 350 credits, then plans from $9/mo. Cancel anytime before the trial ends.

[← Webhooks API](/docs/api/webhooks)[All documentation →](/docs)
